[damned-lies] Ignore pogrep.rungrep exceptions
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Ignore pogrep.rungrep exceptions
- Date: Tue, 17 Sep 2019 08:47:45 +0000 (UTC)
commit 02a711853f54589287178c769aae89a5b2e31ab1
Author: Claude Paroz <claude 2xlibre net>
Date: Tue Sep 17 10:47:35 2019 +0200
Ignore pogrep.rungrep exceptions
stats/utils.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/stats/utils.py b/stats/utils.py
index 7023d464..6332ef0f 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -384,7 +384,10 @@ def po_grep(in_file, out_file, filter_):
return
grepfilter = pogrep.GrepFilter(filter_str, filter_loc, useregexp=True, invertmatch=True,
keeptranslations=True)
with open(out_file, "wb") as out:
- pogrep.rungrep(in_file, out, None, grepfilter)
+ try:
+ pogrep.rungrep(in_file, out, None, grepfilter)
+ except Exception:
+ pass
# command-line variant:
"""
cmd = "pogrep --invert-match --header --search=locations --regexp \"gschema\\.xml\\.in|schemas\\.in\"
%(full_po)s %(part_po)s" % {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]