Skip to content

Commit 46d473e

Browse files
committed
Add try catch
1 parent 6f24962 commit 46d473e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

root/app/swag-ondemand.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
class ContainerThread(threading.Thread):
1818
def __init__(self):
1919
super().__init__()
20-
self.docker_client = docker.from_env()
2120
self.daemon = True
21+
try:
22+
self.docker_client = docker.from_env()
23+
except Exception as e:
24+
logging.exception(e)
2225

2326
def process_containers(self):
2427
global ondemand_containers

0 commit comments

Comments
 (0)