Commits

Steve Borho committed 9459490

histselect: catch parsing errors in log parser

fixes traceback reported in issue #125

Somehow 'hg log' generated a line to stdout that was not
empty and also did not have a colon.

  • Participants
  • Parent commits 523b97d

Comments (0)

Files changed (1)

hggtk/histselect.py

                     histlist.append(cs)
                     cs = {}
             else:
-                name, value = re.split(':\s+', x, 1)
-                if name not in cs:
-                    cs[name] = []
-                cs[name].append(hglib.toutf(value))
+                try:
+                    name, value = re.split(':\s+', x, 1)
+                    if name not in cs:
+                        cs[name] = []
+                    cs[name].append(hglib.toutf(value))
+                except ValueError:
+                    pass
         if cs:
             histlist.append(cs)