1
0
This commit is contained in:
ThomasV
2014-01-26 20:46:43 +01:00
parent d4fbe85d7d
commit 7c6bc72cb4
4 changed files with 30 additions and 22 deletions

View File

@@ -121,7 +121,7 @@ def run_command(cmd, password=None, args=[]):
try:
result = func(*args[1:])
except socket.error:
print "Network server not found."
print "Daemon not running"
sys.exit(1)
except Exception:
traceback.print_exc(file=sys.stdout)
@@ -222,9 +222,6 @@ if __name__ == '__main__':
if cmd.name in ['create', 'restore']:
if storage.file_exists:
sys.exit("Error: Remove the existing wallet first!")
@@ -370,7 +367,7 @@ if __name__ == '__main__':
args = args[0:cmd.min_args] + [message]
if cmd.name == 'start_network':
if cmd.name == 'daemon' and args[1] == 'start':
pid = os.fork()
if (pid == 0): # The first child.
os.chdir("/")
@@ -397,13 +394,9 @@ if __name__ == '__main__':
server.running = True
while server.running:
server.handle_request()
print_msg("Server stopped")
sys.exit(0)
else:
sys.exit(0)
else:
sys.exit(0)
print_msg("Daemon stopped")
sys.exit(0)
# run the command
if cmd.name == 'deseed':