Skip to content

Commit b24e3a9

Browse files
committed
signtool: signtool executable might not be initialized
1 parent b585318 commit b24e3a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

windows_tools/signtool/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def get_timestamp_server(self):
152152
def sign(
153153
self, executable, bitness: Union[None, int, str] = None, dry_run: bool = False
154154
):
155+
signtool = None
155156
if not bitness:
156157
possible_bitness = is_64bit_executable(executable)
157158
if possible_bitness is not None:
@@ -166,7 +167,7 @@ def sign(
166167
)
167168

168169

169-
if not os.path.exists(signtool):
170+
if not signtool or not os.path.exists(signtool):
170171
raise EnvironmentError("Could not find valid signtool.exe")
171172

172173
cmd = "{} sign -tr {} -td sha256 -fd sha256".format(

0 commit comments

Comments
 (0)