Minor cleanups

- Remove superfluous parentheses
- Remove unneccessary pass
pull/2496/head
Åke Forslund 2020-03-29 13:34:18 +02:00
parent 05695f5b5f
commit 26ef052891
1 changed files with 1 additions and 2 deletions

View File

@ -116,7 +116,7 @@ def read_dict(filename, div='='):
d = {} d = {}
with open(filename, 'r') as f: with open(filename, 'r') as f:
for line in f: for line in f:
(key, val) = line.split(div) key, val = line.split(div)
d[key.strip()] = val.strip() d[key.strip()] = val.strip()
return d return d
@ -248,7 +248,6 @@ def ensure_directory_exists(directory, domain=None):
os.makedirs(directory, 0o777) # give everyone rights to r/w here os.makedirs(directory, 0o777) # give everyone rights to r/w here
except OSError: except OSError:
LOG.warning("Failed to create: " + directory) LOG.warning("Failed to create: " + directory)
pass
finally: finally:
os.umask(save) os.umask(save)