incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [2/2] git commit: [#6949] ticket:509 Remove incomplete JSON file during bulk export
Date Fri, 14 Feb 2014 20:33:12 GMT
[#6949] ticket:509 Remove incomplete JSON file during bulk export


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6bec5bfc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6bec5bfc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6bec5bfc

Branch: refs/heads/master
Commit: 6bec5bfcd36d4c6821b03fa37e052c9f41530527
Parents: 70ff609
Author: Aleksey 'LXj' Alekseyev <gotletter@gmail.com>
Authored: Fri Jan 31 19:05:30 2014 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Feb 14 20:07:24 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tasks/export_tasks.py | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6bec5bfc/Allura/allura/tasks/export_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/export_tasks.py b/Allura/allura/tasks/export_tasks.py
index b146a00..d50d22b 100644
--- a/Allura/allura/tasks/export_tasks.py
+++ b/Allura/allura/tasks/export_tasks.py
@@ -114,6 +114,10 @@ class BulkExport(object):
         except Exception:
             log.error('Error exporting: %s on %s', tool,
                       app.project.shortname, exc_info=True)
+            try:
+                os.remove(json_file)
+            except:
+                pass
             return None
         else:
             return app


Mime
View raw message