This repository was archived by the owner on Sep 12, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 3
3
import rsa
4
4
import yaml
5
5
6
- from .core .exceptions import FileNotFoundError , ConfigError
6
+ from .core .exceptions import ConfigError
7
+ from .core .exceptions import FileNotFoundError
7
8
8
9
9
10
class Config (object ):
@@ -60,13 +61,13 @@ def load():
60
61
'config' , config_path )
61
62
try :
62
63
f = open (config_path )
63
- except :
64
+ except Exception :
64
65
raise FileNotFoundError (
65
66
'Heads-up! File is missing: %s' % config_path )
66
67
67
68
try :
68
69
data = yaml .load (f )
69
- except :
70
+ except Exception :
70
71
raise ConfigError (
71
72
'Config file (%s) is not valid yaml' % config_path )
72
73
@@ -78,13 +79,13 @@ def load():
78
79
if 'privileged_key' in config :
79
80
try :
80
81
f = open (config ['privileged_key' ])
81
- except :
82
+ except Exception :
82
83
raise FileNotFoundError (
83
84
'Heads-up! File is missing: %s' % config ['privileged_key' ])
84
85
85
86
try :
86
87
config ['privileged_key' ] = rsa .PublicKey .load_pkcs1 (f .read ())
87
- except :
88
+ except Exception :
88
89
raise ConfigError (
89
90
'Key at %s is not a valid RSA key' % config ['privileged_key' ])
90
91
Original file line number Diff line number Diff line change 80
80
81
81
elif is_py3 :
82
82
logger .debug ("This is python3" )
83
- from urllib .parse import quote_plus # noqa
83
+ from urllib .parse import quote_plus # noqa
84
84
85
85
builtin_str = str
86
86
str = str
You can’t perform that action at this time.
0 commit comments