Created
May 24, 2009 03:06
-
-
Save bbrowning/116931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- file_manager_orig.py 2009-05-23 23:01:26.000000000 -0400 | |
+++ file_manager.py 2009-05-21 19:03:01.000000000 -0400 | |
@@ -639,7 +639,7 @@ class FileManager(object): | |
name = os.path.join('vendor/%s' % vendor, name) | |
signature = sign_file(file_path) | |
_signatures[name] = signature | |
- _attachments[name] = open(file_path, 'rb') | |
+ _attachments[name] = file_path | |
# detect attachments to be removed and keep | |
# only new version attachments to update. | |
@@ -671,9 +671,10 @@ class FileManager(object): | |
if verbose >= 2: | |
print "Attaching %s" % filename | |
+ f = open(value, 'rb') | |
# fix issue with httplib that raises BadStatusLine | |
# error because it didn't close the connection | |
- self._put_attachment(db, design, value, filename) | |
+ self._put_attachment(db, design, f, filename) | |
# update signatures | |
design = db[docid] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment