]> git.proxmox.com Git - mirror_ovs.git/commitdiff
extract-ofp-errors: Minor improvements.
authorBen Pfaff <blp@ovn.org>
Thu, 8 Feb 2018 22:54:09 +0000 (14:54 -0800)
committerBen Pfaff <blp@ovn.org>
Tue, 13 Feb 2018 19:39:43 +0000 (11:39 -0800)
This removes the requirement of exactly two spaces before the error
description (now one or more is fine).  It also makes an error message
clearer.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: William Tu <u9012063@gmail.com>
build-aux/extract-ofp-errors

index 71ae0bd5f0ffafa987303b3e6fcbc15066b67e29..6c14f68b883a6539b96f642d5c3805f3d9345e79 100755 (executable)
@@ -247,7 +247,7 @@ def extract_ofp_errors(fn):
             expected_errors[m.group(1)] = (fileName, lineNumber)
             continue
 
-        m = re.match('((?:.(?!\.  ))+.)\.  (.*)$', comment)
+        m = re.match('((?:.(?!\.  ))+.)\.\s+(.*)$', comment)
         if not m:
             fatal("unexpected syntax between errors")
 
@@ -257,7 +257,7 @@ def extract_ofp_errors(fn):
         m = re.match('\s+(?:OFPERR_([A-Z0-9_]+))(\s*=\s*OFPERR_OFS)?,',
                      line)
         if not m:
-            fatal("syntax error expecting enum value")
+            fatal("syntax error expecting OFPERR_ enum value")
 
         enum = m.group(1)
         if enum in names: