Skip to content

Commit

Permalink
Use "raise SystemExit" because of windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
0x9900 committed Apr 22, 2024
1 parent 00ce98d commit b52a150
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sa818.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def main():
print('sa818: error: the following arguments are required: {radio,volume,filters,version}\n'
'use --help for more informatiion',
file=sys.stderr)
sys.exit(os.EX_USAGE)
raise SystemExit(os.EX_USAGE) from None

if opts.debug:
logger.setLevel(logging.DEBUG)
Expand All @@ -389,7 +389,7 @@ def main():
radio = SA818(opts.port, opts.speed)
except (IOError, SystemError) as err:
logger.error(err)
sys.exit(os.EX_IOERR)
raise SystemExit(os.EX_IOERR) from None

if opts.func == 'version':
radio.version()
Expand Down

0 comments on commit b52a150

Please sign in to comment.