Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 3050955

Browse files
author
dmp42
committed
Make flake happy
1 parent 5296ee8 commit 3050955

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

docker_registry/lib/config.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import rsa
44
import yaml
55

6-
from .core.exceptions import FileNotFoundError, ConfigError
6+
from .core.exceptions import ConfigError
7+
from .core.exceptions import FileNotFoundError
78

89

910
class Config(object):
@@ -60,13 +61,13 @@ def load():
6061
'config', config_path)
6162
try:
6263
f = open(config_path)
63-
except:
64+
except Exception:
6465
raise FileNotFoundError(
6566
'Heads-up! File is missing: %s' % config_path)
6667

6768
try:
6869
data = yaml.load(f)
69-
except:
70+
except Exception:
7071
raise ConfigError(
7172
'Config file (%s) is not valid yaml' % config_path)
7273

@@ -78,13 +79,13 @@ def load():
7879
if 'privileged_key' in config:
7980
try:
8081
f = open(config['privileged_key'])
81-
except:
82+
except Exception:
8283
raise FileNotFoundError(
8384
'Heads-up! File is missing: %s' % config['privileged_key'])
8485

8586
try:
8687
config['privileged_key'] = rsa.PublicKey.load_pkcs1(f.read())
87-
except:
88+
except Exception:
8889
raise ConfigError(
8990
'Key at %s is not a valid RSA key' % config['privileged_key'])
9091

docker_registry/lib/core/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
elif is_py3:
8282
logger.debug("This is python3")
83-
from urllib.parse import quote_plus # noqa
83+
from urllib.parse import quote_plus # noqa
8484

8585
builtin_str = str
8686
str = str

0 commit comments

Comments
 (0)