File: dmm-perform-recipe

package info (click to toggle)
python3-dmm 0.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: python: 441; makefile: 2
file content (23 lines) | stat: -rwxr-xr-x 545 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/python3
"""
Perform a recipe using DMM.
"""

from loguru import logger
logger.info("Initialized logging")
import dmm.dmm as dmm
import os
import sys

logger.add(sys.stderr, format="{time} {level} {message}", filter="perform_recipe", level="INFO")

if len(sys.argv) < 2:
    logger.error("E: You need to specify the full path to the recipe")
    sys.exit(4041)
else:
    if os.path.isfile(sys.argv[1]):
        dmm.perform_recipe(sys.argv[1])
    else:
        print("E: The specified file could not be found.")
        sys.exit(404)