Move exit on missing address code inside the import guard
Simon Volpert
6 years ago
1024 | 1024 | if addr != address: |
1025 | 1025 | # Replace the plaintext entry with a ready-to-use tuple |
1026 | 1026 | config['addresses'][config['addresses'].index(address)] = (addr, idx) |
1027 | if config['addresses'] == [] and 'xpub' not in config: | |
1028 | logging.critical('No receiving addresses available. Please add some receiving addresses or an extended public key to your config file.') | |
1029 | sys.exit(2) | |
1030 | 1027 | logging.debug('{} receiving addresse(s) loaded'.format(len(config['addresses']))) |
1031 | 1028 | if 'xpub' in config: |
1032 | 1029 | logging.debug('Current derivation index set to {}'.format(config['index'])) |
1049 | 1046 | |
1050 | 1047 | # Start the web server |
1051 | 1048 | if __name__ == "__main__": |
1049 | if config['addresses'] == [] and 'xpub' not in config: | |
1050 | logging.critical('No receiving addresses available. Please add some receiving addresses or an extended public key to your config file.') | |
1051 | sys.exit(2) | |
1052 | 1052 | httpd = make_server('', config['port'], minipos) |
1053 | 1053 | logging.info('Serving minipos on port {}...'.format(config['port'])) |
1054 | 1054 | try: |