summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
722b81d)
folder = str(settings.UPFILES_FOLDER)
if os.path.exists(folder):
folder = str(settings.UPFILES_FOLDER)
if os.path.exists(folder):
- tf.add(folder, arcname='/upfiles')
+ if isinstance(tf, zipfile.ZipFile):
+ tf.write(folder, arcname='/upfiles')
+ else:
+ tf.add(folder, arcname='/upfiles')
def export_skinsfolder(tf):
folder = djsettings.TEMPLATE_DIRS[0]
if os.path.exists(folder):
def export_skinsfolder(tf):
folder = djsettings.TEMPLATE_DIRS[0]
if os.path.exists(folder):
- tf.add(folder, arcname='/skins')
+ if isinstance(tf, zipfile.ZipFile):
+ tf.write(folder, arcname='/skins')
+ else:
+ tf.add(folder, arcname='/skins')
def export(options, user):
def export(options, user):
rejected = el.add('rejectedTags')
for m in u.tag_selections.all():
rejected = el.add('rejectedTags')
for m in u.tag_selections.all():
- if m.reason == 'good':
- watched.add('tag', m.tag.name)
- else:
- rejected.add('tag', m.tag.name)
+ try:
+ if m.reason == 'good':
+ watched.add('tag', m.tag.name)
+ else:
+ rejected.add('tag', m.tag.name)
+ except Tag.DoesNotExist:
+ pass