Skip to content

Commit

Permalink
Lint tools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kronolynx committed Feb 7, 2017
1 parent d43fd63 commit ddc1813
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def validate_uri(uri, error_field, callback):
Args:
uri (str): MongoDB URI
error_field (urwid.Text): field that displays the error
error_message (str): message to display in case of error
callback (function): callback to call on success
"""
parsed = parse_mongo_uri(uri)
Expand Down Expand Up @@ -81,6 +80,8 @@ def send_result(email, result, title, urn):
Args:
email (str): address to send the results
result (obj): results to send
title (str):
urn (str): uniform resource name
Returns:
str: response from endpoint
"""
Expand All @@ -93,7 +94,8 @@ def send_result(email, result, title, urn):
response = urllib2.urlopen(req)
return response.read()
except (urllib2.HTTPError, urllib2.HTTPError) as exc:
return "Sadly enough, we are having technical difficulties at the moment, please try again later.\n\n%s" % str(exc)
return "Sadly enough, we are having technical difficulties at the moment, " \
"please try again later.\n\n%s" % str(exc)


def load_test(path):
Expand Down Expand Up @@ -148,7 +150,7 @@ def check_version(version):


def in_range(num, minimum, maximum):
return num >= minimum and num <= maximum
return minimum <= num <= maximum


def check_terminal():
Expand Down

0 comments on commit ddc1813

Please sign in to comment.