]> granicus.if.org Git - python/commitdiff
Display the name not the group itself
authorRaymond Hettinger <python@rcn.com>
Mon, 23 Jun 2014 02:45:07 +0000 (19:45 -0700)
committerRaymond Hettinger <python@rcn.com>
Mon, 23 Jun 2014 02:45:07 +0000 (19:45 -0700)
Lib/sre_parse.py

index 662e49a187b4a2f7c02d2f87d369962a80930804..0a361abc707b1c601c1a8c2be858ae9750fa70ec 100644 (file)
@@ -621,7 +621,7 @@ def _parse(source, state):
                     if isname(condname):
                         condgroup = state.groupdict.get(condname)
                         if condgroup is None:
-                            msg = "unknown group name: {0!r}".format(condgroup)
+                            msg = "unknown group name: {0!r}".format(condname)
                             raise error(msg)
                     else:
                         try: