Skip to content

Commit

Permalink
[#313] use format instead of f string
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdoker18 committed Dec 28, 2018
1 parent 22d782d commit 2098980
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions legion/legion/edi/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _save_credentials(edi, token):
with config_path.open("w") as config_file:
config.write(config_file)

LOG.debug(f'Save config {config} to the file {config_path}')
LOG.debug('Save config {} to the file {}'.format(config, config_path))


def login(args):
Expand Down Expand Up @@ -131,6 +131,6 @@ def get_security_params_from_config():

return dict(config['security'])
except Exception as e:
LOG.debug(f'Exception during parsing of legion config {e}')
LOG.debug('Exception during parsing of legion config {}'.format(e))

return {}
7 changes: 4 additions & 3 deletions legion/legion/external/edi.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,14 @@ def _query(self, url_template, payload=None, action='GET'):

# We assume if there were redirects then credentials are out of date
if response.history:
LOGGER.debug(f'Status code: "{response.status_code}", Response: "{response.text}"')
LOGGER.debug('Status code: "{}", Response: "{}"'.format(response.status_code, response.text))

parse_result = urlparse(target_url)

raise Exception(
f'Credentials are not correct. You should open {parse_result.scheme}://{parse_result.netloc}'
f' url in a browser to get fresh token'
'Credentials are not correct. You should open {}://{} url in a browser to get fresh token'.format(
parse_result.scheme, parse_result.netloc
)
)

try:
Expand Down
2 changes: 1 addition & 1 deletion legion_test/bin/check_jenkins_jobs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.6
#!/usr/bin/env python3
#
# Copyright 2017 EPAM Systems
#
Expand Down
2 changes: 1 addition & 1 deletion legion_test/bin/cleanup_nexus_repo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.6
#!/usr/bin/env python3
#
# Copyright 2018 EPAM Systems
#
Expand Down
2 changes: 1 addition & 1 deletion legion_test/bin/copyright_scanner
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.6
#!/usr/bin/env python3
#
# Copyright 2017 EPAM Systems
#
Expand Down
2 changes: 1 addition & 1 deletion legion_test/bin/create_example_jobs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.6
#!/usr/bin/env python3
#
# Copyright 2017 EPAM Systems
#
Expand Down
2 changes: 1 addition & 1 deletion legion_test/bin/jenkins_dex_client
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.6
#!/usr/bin/env python3
#
# Copyright 2018 EPAM Systems
#
Expand Down
2 changes: 1 addition & 1 deletion legion_test/bin/legion_bootstrap_grafana
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3.6
#!/usr/bin/env python3
#
# Copyright 2017 EPAM Systems
#
Expand Down

0 comments on commit 2098980

Please sign in to comment.