summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2023-02-19 04:33:46 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2023-02-19 04:33:46 -0600
commitb2fbb532e359985142a71354b5b648ae560a80ac (patch)
tree89ef6ea7a9e39f94845d5eca7855e1e32489759e /src
parentc4bafa375d8aa387201a6f622aff3d22f1753b31 (diff)
add final arg parser tests, refactor pyssg error msgs
Diffstat (limited to 'src')
-rw-r--r--src/pyssg/pyssg.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pyssg/pyssg.py b/src/pyssg/pyssg.py
index 678000b..9b46a66 100644
--- a/src/pyssg/pyssg.py
+++ b/src/pyssg/pyssg.py
@@ -24,17 +24,17 @@ def main() -> None:
arg_parser.print_usage()
# even if it's an error, print it as info
# as it is not critical, only config related
- log.info(message)
+ log.info(f'pyssg: error: {message}, --help for more')
sys.exit(1)
# -1 as first argument is program path
num_args = len(sys.argv) - 1
if num_args == 2 and args['config']:
- _log_perror('pyssg: error: only config argument passed, --help for more')
+ _log_perror('only config argument passed')
elif not num_args > 0 or (num_args == 1 and args['debug']):
- _log_perror('pyssg: error: no arguments passed, --help for more')
+ _log_perror('no arguments passed')
elif num_args == 3 and (args['debug'] and args['config']):
- _log_perror("pyssg: error: no arguments passed other than 'debug' and 'config', --help for more")
+ _log_perror('no arguments passed other than "debug" and "config"')
if args['version']:
log.info('pyssg v%s', VERSION)