Skip to content

Commit 2e4eedd

Browse files
committed
Narrowed the exceptions to be caught, as of @mr-c indication.
Also, cosmetic changes to fix some flake8 complaints.
1 parent e656358 commit 2e4eedd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cwltool/docker.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import json
66
import math
77
import os
8-
import re
98
import shutil
109
import subprocess # nosec
1110
import sys
@@ -124,8 +123,8 @@ def get_image(
124123
"utf-8"
125124
)
126125
)
127-
found = True
128-
except Exception as e:
126+
found = manifest is not None
127+
except (OSError, subprocess.CalledProcessError, UnicodeError):
129128
pass
130129

131130
if (force_pull or not found) and pull_image:

0 commit comments

Comments
 (0)