Skip to content

Commit a8c2ca0

Browse files
author
Khabarov Konstantin Olegovich
committed
linter fix
1 parent fa14732 commit a8c2ca0

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

mobsf/MobSF/proxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
logger = logging.getLogger(__name__)
88

9+
910
def upstream_proxy(flaw_type, for_urllib=False):
1011
"""Set upstream Proxy if needed."""
1112
if settings.UPSTREAM_PROXY_ENABLED:
@@ -65,4 +66,3 @@ def docker_translate_proxy_ip(ip):
6566
if ip and ip.strip() in ('127.0.0.1', 'localhost'):
6667
return 'host.docker.internal'
6768
return ip
68-

mobsf/MobSF/tools_download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def download_file(url, file_path):
2727
req = Request(url)
2828
system_proxies = getproxies()
2929
if system_proxies:
30-
proxies=system_proxies
30+
proxies = system_proxies
3131
else:
3232
proxies, verify = upstream_proxy('https', for_urllib=True)
3333
proxy_handler = ProxyHandler(proxies)

mobsf/StaticAnalyzer/views/android/playstore.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import requests
99

1010
import logging
11-
1211
from urllib.request import (
1312
HTTPSHandler,
1413
ProxyHandler,
@@ -17,13 +16,12 @@
1716
install_opener,
1817
)
1918

20-
from mobsf.MobSF.settings import (PLAYSTORE)
21-
22-
from django.conf import settings
23-
19+
from mobsf.MobSF.settings import PLAYSTORE
2420
from mobsf.MobSF.utils import append_scan_status
2521
from mobsf.MobSF.proxy import upstream_proxy
2622

23+
from django.conf import settings
24+
2725
logger = logging.getLogger(__name__)
2826

2927

@@ -45,7 +43,7 @@ def get_app_details(app_dic, man_data):
4543
msg = f'Fetching Details from Play Store: {package_id}'
4644
logger.info(msg)
4745
append_scan_status(checksum, msg)
48-
proxies,verify = upstream_proxy('https', for_urllib=True)
46+
proxies, verify = upstream_proxy('https', for_urllib=True)
4947
proxy_handler = ProxyHandler(proxies)
5048
if verify:
5149
ssl_context = ssl.create_default_context()
@@ -59,7 +57,7 @@ def get_app_details(app_dic, man_data):
5957
if response.status == 200:
6058
det = app(package_id)
6159
except Exception:
62-
logger.warning(f'Play Store unreachable, skipping')
60+
logger.warning('Play Store unreachable, skipping')
6361
det.pop('descriptionHTML', None)
6462
det.pop('comments', None)
6563
description = BeautifulSoup(det['description'], features='lxml')

0 commit comments

Comments
 (0)