Skip to content

Commit be3b562

Browse files
committed
Silence error
1 parent 6b5e8df commit be3b562

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gravity/process_manager/supervisor_manager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def __supervisord(self):
228228
if not self.__supervisord_is_running():
229229
# any time that supervisord is not running, let's rewrite supervisord.conf
230230
open(self.supervisord_conf_path, "w").write(SUPERVISORD_CONF_TEMPLATE.format(**format_vars))
231-
self.__supervisord_popen = subprocess.Popen(supervisord_cmd, env=os.environ, stderr=subprocess.PIPE)
231+
self.__supervisord_popen = subprocess.Popen(supervisord_cmd, env=os.environ)
232232

233233
rc = self.__supervisord_popen.poll()
234234
if rc:
@@ -257,7 +257,10 @@ def _check_path_length(self):
257257
self._handle_socket_path_error()
258258
finally:
259259
sock.close()
260-
os.unlink(bind_path)
260+
try:
261+
os.unlink(bind_path)
262+
except FileNotFoundError as e2:
263+
pass # There's nothing to unlink. File may not exists during testing.
261264

262265
def _handle_socket_path_error(self):
263266
msg = f"""

0 commit comments

Comments
 (0)