Skip to content

Commit 5100e40

Browse files
committed
minor improvement
minor improvement
1 parent ab35ad0 commit 5100e40

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/IpGeoLocationLib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def GetInfo(self, userAgent, targetsFile=None,
138138
def __checkProxyUrl(self, url):
139139
"""Check if proxy url is valid"""
140140
url_checked = urlparse(url)
141-
if ((url_checked.scheme != 'http') & (url_checked.scheme != 'https')) | (url_checked.netloc == ''):
141+
if (url_checked.scheme not in ('http', 'https')) | (url_checked.netloc == ''):
142142
return False
143143
return url_checked
144144

core/Menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def checkFileWrite(filename):
7070
def checkProxyUrl(url):
7171
"""Check if proxy url is valid"""
7272
url_checked = urlparse(url)
73-
if ((url_checked.scheme != 'http') & (url_checked.scheme != 'https')) | (url_checked.netloc == ''):
73+
if (url_checked.scheme not in ('http', 'https')) | (url_checked.netloc == ''):
7474
raise argparse.ArgumentTypeError('Invalid {} Proxy URL (example: http://127.0.0.1:8080).'.format(url))
7575
return url_checked
7676

0 commit comments

Comments
 (0)