Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
minor improvement
  • Loading branch information
maldevel committed Apr 21, 2016
1 parent ab35ad0 commit 5100e40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/IpGeoLocationLib.py
Expand Up @@ -138,7 +138,7 @@ def GetInfo(self, userAgent, targetsFile=None,
def __checkProxyUrl(self, url):
"""Check if proxy url is valid"""
url_checked = urlparse(url)
if ((url_checked.scheme != 'http') & (url_checked.scheme != 'https')) | (url_checked.netloc == ''):
if (url_checked.scheme not in ('http', 'https')) | (url_checked.netloc == ''):
return False
return url_checked

Expand Down
2 changes: 1 addition & 1 deletion core/Menu.py
Expand Up @@ -70,7 +70,7 @@ def checkFileWrite(filename):
def checkProxyUrl(url):
"""Check if proxy url is valid"""
url_checked = urlparse(url)
if ((url_checked.scheme != 'http') & (url_checked.scheme != 'https')) | (url_checked.netloc == ''):
if (url_checked.scheme not in ('http', 'https')) | (url_checked.netloc == ''):
raise argparse.ArgumentTypeError('Invalid {} Proxy URL (example: http://127.0.0.1:8080).'.format(url))
return url_checked

Expand Down

0 comments on commit 5100e40

Please sign in to comment.