CO - Bug fix with empty records (not allowed)

community
Gogs 7 years ago
parent ad2c911c0a
commit a453d9d2aa

@ -194,8 +194,10 @@ class Folders(Actor):
@pre : isValid @pre : isValid
""" """
folder = item['label'] folder = item['label']
signature='-'.join([str(item['date']),str(item['count']),'-files']) name = folder.split(os.sep)
tarball=os.sep([folder,signature]) name = name[len(name)-1]
signature='-'.join([name,str(item['date']),str(item['count']),'files'])
tarball=os.sep.join([folder,'..',signature])
shutil.make_archive(tarball,'tar',folder) shutil.make_archive(tarball,'tar',folder)
self.clean(item) self.clean(item)
# #
@ -212,7 +214,7 @@ class Folders(Actor):
rpath = item['label'] rpath = item['label']
files = os.listdir(item['label']) files = os.listdir(item['label'])
for name in list(files) : for name in list(files) :
path = os.sep([item['label'],name]) path = os.sep.join([item['label'],name])
if os.path.isdir(path) : if os.path.isdir(path) :
shutil.rmtree(path) shutil.rmtree(path)
else: else:

@ -230,6 +230,8 @@ class Manager() :
else: else:
#label = id #label = id
row = data row = data
if type(row)==list and len(row) == 0 :
continue
# #
# #

Loading…
Cancel
Save