File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ def __str__(self):
5656
5757class Pygoruut :
5858 def __init__ (self , version = None , writeable_bin_dir = None , api = None ):
59- self .executable , self .platform , self .version = MyPlatformExecutable (version ).get ()
59+ if api is None :
60+ self .executable , self .platform , self .version = MyPlatformExecutable (version ).get ()
61+ else :
62+ self .executable = None
6063 if self .executable is None :
6164 if api is not None :
6265 self .executable = None
@@ -112,7 +115,7 @@ def compatible_version(self) -> str:
112115 return self .version .rstrip ('0123456789' )
113116
114117 def __del__ (self ):
115- if hasattr (self , 'process' ):
118+ if hasattr (self , 'process' ) and self . process is not None :
116119 self .process .terminate ()
117120 self .process .wait ()
118121
You can’t perform that action at this time.
0 commit comments