richleland / django-cumulus (http://packages.python.org/django-cumulus/)

An interface to Rackspace Cloud Files through Django.

Clone this repository (size: 76.4 KB): HTTPS / SSH
$ hg clone http://code.richleland.com/django-cumulus
commit 44: 4ae167481990
parent 43: ed7dfe123bcf
branch: default
Fixed deletion bug, upped verbosity requirement.
Rich Leland / richleland
4 months ago

Changed (Δ3 bytes):

Up to file-list cumulus/management/commands/syncstatic.py:

@@ -112,14 +112,14 @@ class Command(BaseCommand):
112
112
                                               os.stat(file_path).st_mtime)
113
113
            if cloud_datetime and local_datetime < cloud_datetime:
114
114
                self.skip_count += 1
115
                if self.verbosity > 0:
115
                if self.verbosity > 1:
116
116
                    print "Skipped %s: not modified." % object_name
117
117
                continue
118
118
            
119
119
            if not self.test_run:
120
120
                cloud_obj.load_from_filename(file_path)
121
121
            self.upload_count += 1
122
            if self.verbosity > 0:
122
            if self.verbosity > 1:
123
123
                print "Uploaded", cloud_obj.name
124
124
    
125
125
    def delete_files(self):
@@ -127,7 +127,7 @@ class Command(BaseCommand):
127
127
        for cloud_name in self.container.list_objects():
128
128
            if cloud_name not in self.local_object_names:
129
129
                self.delete_count += 1
130
                if self.verbosity > 0:
131
                    print "Deleted" % cloud_name
130
                if self.verbosity > 1:
131
                    print "Deleted %s" % cloud_name
132
132
                if not self.test_run:
133
133
                    self.container.delete_object(cloud_name)