Skip to content

Commit c8b4424

Browse files
committed
content_encoding is undefined if filename is "-"
Define var before use. Cutting edge computer science in action.
1 parent 95e2345 commit c8b4424

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

S3/S3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ def object_put(self, filename, uri, extra_headers = None, extra_label = ""):
413413

414414
## MIME-type handling
415415
content_type = self.config.mime_type
416+
content_encoding = None
416417
if filename != "-" and not content_type and self.config.guess_mime_type:
417418
(content_type, content_encoding) = mime_magic(filename)
418419
if not content_type:

0 commit comments

Comments
 (0)