|
|
@ -479,16 +479,19 @@ if __name__ == '__main__': |
|
|
|
|
|
|
|
set_verbosity(config_options.get('verbose')) |
|
|
|
|
|
|
|
config = SimpleConfig(config_options) |
|
|
|
cmd_name = config.get('cmd') |
|
|
|
|
|
|
|
# check uri |
|
|
|
uri = config.get('url') |
|
|
|
uri = config_options.get('url') |
|
|
|
if uri: |
|
|
|
# Assume a file is a payment request |
|
|
|
if not os.path.exists(uri) and not re.match('^bitcoin:', uri): |
|
|
|
if os.path.exists(uri): |
|
|
|
# assume this is a payment request |
|
|
|
uri = "bitcoin:?r=file://"+ os.path.join(os.getcwd(), uri) |
|
|
|
if not re.match('^bitcoin:', uri): |
|
|
|
print_stderr('unknown command:', uri) |
|
|
|
sys.exit(1) |
|
|
|
config_options['url'] = uri |
|
|
|
|
|
|
|
config = SimpleConfig(config_options) |
|
|
|
cmd_name = config.get('cmd') |
|
|
|
|
|
|
|
# initialize plugins. |
|
|
|
plugins = None |
|
|
|