Skip to content

Commit

Permalink
Silence error
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Jun 14, 2022
1 parent 6b5e8df commit be3b562
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gravity/process_manager/supervisor_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def __supervisord(self):
if not self.__supervisord_is_running():
# any time that supervisord is not running, let's rewrite supervisord.conf
open(self.supervisord_conf_path, "w").write(SUPERVISORD_CONF_TEMPLATE.format(**format_vars))
self.__supervisord_popen = subprocess.Popen(supervisord_cmd, env=os.environ, stderr=subprocess.PIPE)
self.__supervisord_popen = subprocess.Popen(supervisord_cmd, env=os.environ)

rc = self.__supervisord_popen.poll()
if rc:
Expand Down Expand Up @@ -257,7 +257,10 @@ def _check_path_length(self):
self._handle_socket_path_error()
finally:
sock.close()
os.unlink(bind_path)
try:
os.unlink(bind_path)
except FileNotFoundError as e2:
pass # There's nothing to unlink. File may not exists during testing.

def _handle_socket_path_error(self):
msg = f"""
Expand Down

0 comments on commit be3b562

Please sign in to comment.