Update Folders and Document apps to use the latest backup classes definitions

This commit is contained in:
Roberto Rosario
2012-08-10 20:00:03 -04:00
parent 731835ef70
commit a76a3b28fd
4 changed files with 11 additions and 7 deletions

View File

@@ -53,12 +53,12 @@ class ElementBackupModel(ElementBackupBase):
class ElementBackupFile(ElementBackupBase):
label = _(u'File copy')
def __init__(self, storage_class, filepath):
def __init__(self, storage_class, filepath=None):
self.storage_class = storage_class
self.filepath = filepath
def info(self):
return _(u'%s from %s') % (self.filepath, self.storage_class)
return _(u'%s from %s') % (self.filepath or _(u'all files'), self.storage_class)
def backup(self):
"""
@@ -166,7 +166,7 @@ class TestStorageModule(StorageModuleBase):
print data
print '***** saving to path: %s' % self.backup_path
def restore(self):-
def restore(self):
print 'restore from path: %s' % self.restore_path
return 'sample_data'