Skip to content

Commit

Permalink
some crash handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyhyman committed May 21, 2021
1 parent e9316c5 commit d1820e4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rmc/rmc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,10 @@ def new_user(self, user=None):
self.update_userview()

# Restart authentication server (send new userlist)
self.toggle_auth(False)
self.toggle_auth(True)
# if running:
if hasattr(self,'tcp_proc'):
self.toggle_auth(False)
self.toggle_auth(True)

def toggle_auth(self, state):
""" Toggle authentication server """
Expand Down Expand Up @@ -580,6 +582,10 @@ def database_delete(self):
""" Delete a postgres database permanently """

ui_db = self.dbses.selected()

if not ui_db:
return

db_name = ui_db.db_details['name']

quit_msg = f"Are you sure you want to delete database {db_name}?"
Expand Down

0 comments on commit d1820e4

Please sign in to comment.