Skip to content

Commit

Permalink
Code quality improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferry Boender committed Jan 11, 2017
1 parent 3ce2ad0 commit aec8cb8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def _fork(self):

def _cleanup(self, sig=None, frame=None):
"""
Remvoe pid files and call registered shutodnw callbacks.
Remove pid files and call registered shutodnw callbacks.
"""
self.log.info("Received signal %s", sig)
if os.path.exists(self.pid_file):
Expand Down
5 changes: 3 additions & 2 deletions src/scriptform.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ def get_form_config(self):
file_contents = file(self.config_file, 'r').read()
try:
config = json.loads(file_contents)
except ValueError as e:
sys.stderr.write("Error in form configuration '{}': {}\n".format(self.config_file, e))
except ValueError as err:
sys.stderr.write("Error in form configuration '{}': {}\n".format(
self.config_file, err))
sys.exit(1)

static_dir = None
Expand Down
3 changes: 2 additions & 1 deletion src/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ def auth(self):
if auth_header is not None:
# Validate the username and password
auth_unpw = auth_header.split(' ', 1)[1]
username, password = base64.decodestring(auth_unpw).split(":", 1)
username, password = base64.decodestring(auth_unpw).split(":",
1)
pw_hash = hashlib.sha256(password).hexdigest()

if username in form_config.users and \
Expand Down

0 comments on commit aec8cb8

Please sign in to comment.