bug fix: use sys.exit() not exit()

This commit is contained in:
Job Evers-Meltzer 2016-07-18 08:45:14 -05:00
parent a384960a7b
commit a86b4c4e58

View file

@ -35,13 +35,13 @@ def ensureCliIsOnPathAndServerIsRunning():
output = subprocess.check_output(['lbrycrd-cli', 'getinfo']) output = subprocess.check_output(['lbrycrd-cli', 'getinfo'])
except OSError: except OSError:
print 'Failed to run: lbrycrd-cli needs to be on the PATH' print 'Failed to run: lbrycrd-cli needs to be on the PATH'
exit(1) sys.exit(1)
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
print 'Failed to run: could not connect to the lbrycrd server.' print 'Failed to run: could not connect to the lbrycrd server.'
print 'Make sure it is running and able to be connected to.' print 'Make sure it is running and able to be connected to.'
print 'One way to do this is to run:' print 'One way to do this is to run:'
print ' lbrycrdd -server -printtoconsole' print ' lbrycrdd -server -printtoconsole'
exit(1) sys.exit(1)
def validateAddress(addr): def validateAddress(addr):
@ -70,7 +70,7 @@ def getWallet(path=None):
storage = WalletStorage(path) storage = WalletStorage(path)
if not storage.file_exists: if not storage.file_exists:
print "Failed to run: No wallet to migrate" print "Failed to run: No wallet to migrate"
exit(1) sys.exit(1)
return Wallet(storage) return Wallet(storage)