[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] lintChanges.py: Two python re usage fixes



commit 7e1f89346022a4e90d416dad84ffdda483dbd3b5
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Jan 17 08:46:06 2019 -0500

    lintChanges.py: Two python re usage fixes
---
 scripts/maint/lintChanges.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/maint/lintChanges.py b/scripts/maint/lintChanges.py
index 39fa08bb4..82c118f07 100755
--- a/scripts/maint/lintChanges.py
+++ b/scripts/maint/lintChanges.py
@@ -43,7 +43,7 @@ def split_tor_version(version):
 
     If the version is malformed, returns None.
     '''
-    version_match = re.search('([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?', version)
+    version_match = re.match('([0-9]+)\.([0-9]+)\.([0-9]+)(\.([0-9]+))?', version)
     if version_match is None:
         return None
 
@@ -125,7 +125,7 @@ def lintfile(fname):
                 warn("Versions must have at least 3 digits. ('0.1.2', '0.3.4.8', or '0.3.5.1-alpha'.)")
             else:
                 bugfix_match = re.search('bugfix on ([0-9a-z][-.0-9a-z]+[0-9a-z])', contents)
-                bugfix_group = bugfix_match.groups(0) if bugfix_match is not None else None
+                bugfix_group = bugfix_match.groups() if bugfix_match is not None else None
                 bugfix_version = bugfix_group[0] if bugfix_group is not None else None
                 package_version = os.environ.get('PACKAGE_VERSION', None)
                 if bugfix_version is None:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits