+ available = []
+
+ folder = unicode(selsettings.EXPORTER_BACKUP_STORAGE)
+
+ for f in os.listdir(folder):
+ if (not os.path.isdir(os.path.join(folder, f))) and f.endswith('.backup.inf'):
+ try:
+ with open(os.path.join(folder, f), 'r') as inffile:
+ inf = ConfigParser.SafeConfigParser()
+ inf.readfp(inffile)
+
+ if inf.get(DATE_AND_AUTHOR_INF_SECTION, 'site') == settings.APP_URL and os.path.exists(
+ os.path.join(folder, inf.get(DATE_AND_AUTHOR_INF_SECTION, 'file-name'))):
+ available.append({
+ 'author': User.objects.get(id=inf.get(DATE_AND_AUTHOR_INF_SECTION, 'author')),
+ 'date': datetime.datetime.strptime(inf.get(DATE_AND_AUTHOR_INF_SECTION, 'finished'), DATETIME_FORMAT)
+ })
+ except Exception, e:
+ pass
+