Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
bjerrep committed Jan 12, 2020
1 parent 607a367 commit 29b83e0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from common import websocket
from server import playsequencer
from server import inputmux
import time
import time, traceback
import signal
import argparse
import queue
Expand Down Expand Up @@ -314,14 +314,14 @@ def start():
parser.add_argument('--verbose', action='store_true',
help='enable more logging')

results = parser.parse_args()
args = parser.parse_args()

util.get_pid_lock('ludit_server')

if results.verbose:
if args.verbose:
log.setLevel(logging.DEBUG)

if results.newcfg:
if args.newcfg:
config = json.dumps(generate_config(), indent=4, sort_keys=True)
print(config)
exit(0)
Expand All @@ -345,9 +345,11 @@ def ignore(_, __):
signal.signal(signal.SIGPIPE, ignore)

_server = None
_server = Server(results.cfg)
_server = Server(args.cfg)
_server.join()
log.info('server exiting')

except Exception as e:
if args.verbose:
print(traceback.format_exc())
util.die('server exception: %s' % str(e))

0 comments on commit 29b83e0

Please sign in to comment.