Skip to content

Commit

Permalink
Set META data after uploading, duh.
Browse files Browse the repository at this point in the history
  • Loading branch information
rossdakin committed Apr 5, 2009
1 parent 0f35792 commit fadde0c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions django_cloudfiles/management/cloudfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ def upload(self, verbosity=1):
callback = self.progress_bar.tick
else:
callback = None

try:
self.set_mod_hash(self.generate_mod_hash())
self.object.load_from_filename(self.local_path, callback=callback)
except IOError, (errno, string):
print ""
Expand All @@ -67,8 +65,9 @@ def upload(self, verbosity=1):
except cloudfiles.errors.InvalidObjectSize:
print ""
raise CommandError("Invalid size for file: " + self.local_path)

if verbosity > 0:
self.progress_bar.end()

self.set_mod_hash(self.generate_mod_hash())

return self.get_local_size()

0 comments on commit fadde0c

Please sign in to comment.