Continue loading after failures of parsing
authorMagnus Hagander <magnus@hagander.net>
Thu, 3 Jan 2019 10:43:30 +0000 (11:43 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 3 Jan 2019 10:43:30 +0000 (11:43 +0100)
We continued in the mode where we just generated diffs, but not when
making updates. Now continue in both cases, but of course don't do the
actual update if the parsing failed.

loader/reparse_message.py

index df4501a307b0e4670a31eb690614d57b9ed1dd9e..ed4def2f0e000c88aa09ca6c10883f72c3765011 100755 (executable)
@@ -102,8 +102,9 @@ if __name__ == "__main__":
                        ap.analyze(date_override=opt.force_date)
                except IgnorableException as e:
                        if opt.update:
-                               raise e
-                       f.write("Exception loading %s: %s" % (id, e))
+                               print("Exception loading {0}: {1}".format(id, e))
+                       else:
+                               f.write("Exception loading %s: %s" % (id, e))
                        continue
 
                if opt.update: