Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
print(__usage__.strip(), file=sys.stderr)
return 1
# process options
verbose = 0
for o, a in opts:
if o in ('-h', '--help'):
print(__usage__.strip())
return 0
elif o in ('-v', '--verbose'):
verbose += 1
# check arguments
if len(args) != 1:
print('Error: 1 argument required\n', file=sys.stderr)
print(__usage__.strip(), file=sys.stderr)
return 2
pywws.logger.setup_handler(verbose)
data_dir = args[0]
with pywws.storage.pywws_context(data_dir) as context:
return process_data(context)