Before first release

This commit is contained in:
2023-03-24 18:16:26 +01:00
parent b4b81f725d
commit b3b3dbc7b7
4 changed files with 26 additions and 12 deletions

View File

@@ -9,6 +9,7 @@ from importlib_metadata import metadata
import textwrap
import logging
import inspect
import sys
from dyn2py.files import *
from dyn2py.options import *
@@ -91,7 +92,7 @@ def __command_line() -> None:
parser.add_argument("source",
type=pathlib.Path,
help="path to a Dynamo graph, a python script or a folder containing them",
nargs="*"
nargs="+"
)
options = parser.parse_args(namespace=Options())
@@ -128,7 +129,7 @@ def run(options: Options) -> None:
if from_command_line:
# log only if it was called from command line:
logging.error(f"File does not exist: {source}")
exit(1)
sys.exit(1)
else:
raise FileNotFoundError(f"Source file does not exist!")
@@ -181,7 +182,7 @@ def run(options: Options) -> None:
if not files and from_command_line:
logging.error("No files to process! See previous warnings!")
exit(1)
sys.exit(1)
# Cycle through files:
for f in files: