File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ def start(self):
7777 self .stats ['last_started' ] = datetime .now ().isoformat ()
7878 self .save_config ()
7979 return True
80- except Exception as e :
80+ except ( OSError , IOError ) as e :
8181 print (f"Error starting sandbox: { e } " )
8282 return False
8383
@@ -104,7 +104,7 @@ def stop(self):
104104 self .status = "stopped"
105105 self .save_config ()
106106 return True
107- except Exception as e :
107+ except ( OSError , IOError , ProcessLookupError ) as e :
108108 print (f"Error stopping sandbox: { e } " )
109109 return False
110110
@@ -124,7 +124,7 @@ def pause(self):
124124 self .status = "paused"
125125 self .save_config ()
126126 return True
127- except Exception as e :
127+ except ( OSError , IOError ) as e :
128128 print (f"Error pausing sandbox: { e } " )
129129 return False
130130
@@ -144,7 +144,7 @@ def resume(self):
144144 self .status = "running"
145145 self .save_config ()
146146 return True
147- except Exception as e :
147+ except ( OSError , IOError ) as e :
148148 print (f"Error resuming sandbox: { e } " )
149149 return False
150150
You can’t perform that action at this time.
0 commit comments