Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into to-str-with-list
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewWilkes committed Feb 2, 2017
2 parents 1d718d7 + 29d15e4 commit 770adf2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/zope/testbrowser/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,7 @@ def add_file(self, file, content_type, filename):
raise TypeError("Can't call add_file on %s controls"
% self.mech_control.type)

if isinstance(file, io.IOBase):
contents = file.read()
else:
contents = file

contents = file.read()
self._form[self.name] = webtest.forms.Upload(filename or '', contents,
content_type)

Expand Down

0 comments on commit 770adf2

Please sign in to comment.