File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -880,22 +880,20 @@ def get_dependencies(name, environ):
880
880
Uses otool on darwin, ldd on linux. Currently doesn't support windows.
881
881
882
882
"""
883
+ command = None
883
884
if sys .platform == 'darwin' :
884
- proc = sp .Popen (
885
- 'otool -L `which %s`' % name ,
886
- stdout = sp .PIPE ,
887
- stderr = sp .PIPE ,
888
- shell = True ,
889
- env = environ )
885
+ command = 'otool -L `which %s`' % name
890
886
elif 'linux' in sys .platform :
891
- proc = sp .Popen (
892
- 'ldd `which %s`' % name ,
893
- stdout = sp .PIPE ,
894
- stderr = sp .PIPE ,
895
- shell = True ,
896
- env = environ )
887
+ command = 'ldd `which %s`' % name
897
888
else :
898
889
return 'Platform %s not supported' % sys .platform
890
+
891
+ proc = sp .Popen (
892
+ command ,
893
+ stdout = sp .PIPE ,
894
+ stderr = sp .PIPE ,
895
+ shell = True ,
896
+ env = environ )
899
897
o , e = proc .communicate ()
900
898
return o .rstrip ()
901
899
You can’t perform that action at this time.
0 commit comments