Skip to content

Commit

Permalink
Fix flake8 errors
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Ermakov <[email protected]>
  • Loading branch information
aermakov-zalando committed Mar 25, 2019
1 parent 03c835f commit 1729e3d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ python:
install:
- pip install -r requirements.txt
- pip install coveralls
- pip install 'pytest>=3.6'
script:
- python setup.py test
- python setup.py flake8
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def finalize_options(self):
def run_tests(self):
try:
import pytest
except:
except ImportError:
raise RuntimeError('py.test is not installed, run: pip install pytest')
params = {'args': self.test_args}
if self.cov:
Expand Down
6 changes: 3 additions & 3 deletions zign/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def load_config_ztoken(config_file: str):
try:
with open(config_file) as fd:
data = yaml.safe_load(fd)
except:
except Exception:
data = None
return data or {}

Expand All @@ -114,7 +114,7 @@ def get_new_token(realm: str, scope: list, user, password, url=None, insecure=Fa
raise ServerError('Token Service returned HTTP status {}: {}'.format(response.status_code, response.text))
try:
json_data = response.json()
except:
except Exception:
raise ServerError('Token Service returned invalid JSON data')

if not json_data.get('access_token'):
Expand Down Expand Up @@ -167,7 +167,7 @@ def perform_implicit_flow(config: dict):
while True:
try:
httpd = ClientRedirectServer(('127.0.0.1', port_number))
except socket.error as e:
except socket.error:
if port_number > max_port_number:
success = False
break
Expand Down
2 changes: 1 addition & 1 deletion zign/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def delete_token(obj, name):

try:
del data[name]
except:
except Exception:
pass

with open(TOKENS_FILE_PATH, 'w') as fd:
Expand Down

0 comments on commit 1729e3d

Please sign in to comment.