Fix Python linter errors - Part 1#310
Merged
matrixik merged 7 commits intomonasca:masterfrom Nov 8, 2017
Merged
Conversation
kornicameister
previously approved these changes
Oct 30, 2017
Contributor
kornicameister
left a comment
There was a problem hiding this comment.
@timothyb89 you're ok ?
matrixik
reviewed
Nov 2, 2017
ci.py
Outdated
| if os.environ.get('TRAVIS_SECURE_ENV_VARS', None) != "true": | ||
| print('No push permissions in this context, skipping!') | ||
| print('Not pushing: %r' % modules) | ||
| print('Not pushing: {0!r}'.format(modules)) |
ci.py
Outdated
| if os.environ.get('TRAVIS_SECURE_ENV_VARS', None) != "true": | ||
| print('No Docker Hub permissions in this context, skipping!') | ||
| print('Not updating READMEs: %r' % modules) | ||
| print('Not updating READMEs: {0!r}'.format(modules)) |
ci.py
Outdated
| def handle_other(files, modules, tags, pipeline): | ||
| print('Unsupported event type "%s", nothing to do.' % ( | ||
| os.environ.get('TRAVIS_EVENT_TYPE'))) | ||
| print('Unsupported event type "{}", nothing to do.'.format(os.environ.get('TRAVIS_EVENT_TYPE'))) |
Member
There was a problem hiding this comment.
I know max length is set to 120 but I would still prefer to stick closer to 80 chars for better diffs on github and shorter lines in editor.
ci.py
Outdated
| with open(CI_COMPOSE_FILE, 'w') as docker_compose: | ||
| yaml.dump(compose_dict, docker_compose, default_flow_style=False) | ||
| except: | ||
| except (RuntimeError, IOError): |
Member
There was a problem hiding this comment.
Use EnvironmentError instead of IOError
https://docs.python.org/2/library/exceptions.html#exceptions.EnvironmentError
and catch also error from yaml
matrixik
requested changes
Nov 2, 2017
ci.py
Outdated
| compose_dict = yaml.safe_load(compose_file) | ||
| return compose_dict | ||
| except: | ||
| except(RuntimeError, IOError): |
Member
There was a problem hiding this comment.
Use EnvironmentError instead of IOError
https://docs.python.org/2/library/exceptions.html#exceptions.EnvironmentError
and catch also error from yaml
matrixik
approved these changes
Nov 8, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Python lint errors for #264