1
0
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:
Teal Dulcet
2023-12-22 07:08:56 -08:00
committed by Joshua Tauberer
parent 0ee64f2fe8
commit cb922ec286
9 changed files with 19 additions and 19 deletions

View File

@@ -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