Skip to content

Commit a97c501

Browse files
committed
Fix #237: initialize local variable in the correct place.
1 parent 3a59109 commit a97c501

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gnupg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1344,13 +1344,13 @@ def _handle_io(self, args, fileobj_or_path, result, passphrase=None, binary=Fals
13441344
# Handle a basic data call - pass data to GPG, handle the output
13451345
# including status information. Garbage In, Garbage Out :)
13461346
fileobj = self._get_fileobj(fileobj_or_path)
1347+
writer = None # See issue #237
13471348
try:
13481349
p = self._open_subprocess(args, passphrase is not None)
13491350
if not binary: # pragma: no cover
13501351
stdin = codecs.getwriter(self.encoding)(p.stdin)
13511352
else:
13521353
stdin = p.stdin
1353-
writer = None # See issue #237
13541354
if passphrase:
13551355
_write_passphrase(stdin, passphrase, self.encoding)
13561356
writer = _threaded_copy_data(fileobj, stdin, self.buffer_size)

0 commit comments

Comments
 (0)