File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1136,9 +1136,12 @@ def select_ap_interface(preferred=None) -> Optional[str]:
11361136
11371137 def __del__ (self ):
11381138 """Cleanup on deletion."""
1139- import contextlib
1140- with contextlib .suppress (Exception ):
1141- self .cleanup_all ()
1139+ try :
1140+ import contextlib
1141+ with contextlib .suppress (Exception ):
1142+ self .cleanup_all ()
1143+ except ImportError :
1144+ pass
11421145
11431146 # ========================================================================
11441147 # Interface Detection and Capability Checking (Task 2)
Original file line number Diff line number Diff line change @@ -108,9 +108,10 @@ def devnull():
108108 def call (command , cwd = None , shell = False ):
109109 """ Calls a command (either string or list of args). Returns (stdout, stderr) """
110110 if isinstance (command , str ) and not shell :
111- # Only enable shell mode if explicitly requested
111+ # Split string commands into list of args for Popen when not using shell mode
112112 if Configuration .verbose > 1 :
113113 Color .pe (f'\n {{C}}[?]{{W}} Executing: {{B}}{ command } {{W}}' )
114+ command = command .split ()
114115 elif shell :
115116 if Configuration .verbose > 1 :
116117 Color .pe (f'\n {{C}}[?] {{W}} Executing (Shell): {{B}}{ command } {{W}}' )
You can’t perform that action at this time.
0 commit comments