mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-04-15 23:47:24 +02:00
Fixed UP015 (redundant-open-modes): Unnecessary open mode parameters
This commit is contained in:
committed by
Joshua Tauberer
parent
0ee64f2fe8
commit
cb922ec286
@@ -14,7 +14,7 @@ def load_env_vars_from_file(fn):
|
||||
# Load settings from a KEY=VALUE file.
|
||||
import collections
|
||||
env = collections.OrderedDict()
|
||||
with open(fn, 'r') as f:
|
||||
with open(fn) as f:
|
||||
for line in f:
|
||||
env.setdefault(*line.strip().split("=", 1))
|
||||
return env
|
||||
@@ -36,7 +36,7 @@ def load_settings(env):
|
||||
import rtyaml
|
||||
fn = os.path.join(env['STORAGE_ROOT'], 'settings.yaml')
|
||||
try:
|
||||
with open(fn, "r") as f:
|
||||
with open(fn) as f:
|
||||
config = rtyaml.load(f)
|
||||
if not isinstance(config, dict): raise ValueError() # caught below
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user