Skip to content

Commit

Permalink
content_encoding is undefined if filename is "-"
Browse files Browse the repository at this point in the history
Define var before use. Cutting edge computer science in
action.
  • Loading branch information
sshirokov committed Feb 20, 2013
1 parent 95e2345 commit c8b4424
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions S3/S3.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ def object_put(self, filename, uri, extra_headers = None, extra_label = ""):

## MIME-type handling
content_type = self.config.mime_type
content_encoding = None
if filename != "-" and not content_type and self.config.guess_mime_type:
(content_type, content_encoding) = mime_magic(filename)
if not content_type:
Expand Down

0 comments on commit c8b4424

Please sign in to comment.