unix: simplify return statements.

This commit is contained in:
David Wilson 2018-03-26 19:27:43 +05:45
parent d68833757b
commit 95d50adb14
1 changed files with 2 additions and 3 deletions

View File

@ -50,9 +50,8 @@ def is_path_dead(path):
try: try:
s.connect(path) s.connect(path)
except socket.error, e: except socket.error, e:
if e[0] in (errno.ECONNREFUSED, errno.ENOENT): return e[0] in (errno.ECONNREFUSED, errno.ENOENT)
return True return False
return False
def make_socket_path(): def make_socket_path():