diff options
author | Dafydd Harries <daf@rhydd.org> | 2013-03-20 21:13:54 -0400 |
---|---|---|
committer | Dafydd Harries <daf@rhydd.org> | 2013-03-20 21:13:54 -0400 |
commit | 87517ba05cfe0535e36b7aec54262db5f5eb8a27 (patch) | |
tree | 7c16be1fc4fb4336d9c910065cc73ac9f1245145 | |
parent | aaa1c9386c1bdb1267cef04145d9c3c3cc76ea60 (diff) |
export_json.py: handle export errors
-rw-r--r-- | export_json.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/export_json.py b/export_json.py index e2c20ae..370b5fe 100644 --- a/export_json.py +++ b/export_json.py @@ -11,6 +11,12 @@ def main(): for (name, templates) in export.export_all(data): page = [] + try: + # Force errors. + templates = list(templates) + except export.ExportFailure, e: + export.warn('export failed: %s: %s' % (name, e.message)) + for template in templates: tname = template.name values = dict(template.values) |