summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-01-17 08:46:06 -0500
committerNick Mathewson <nickm@torproject.org>2019-01-17 08:46:06 -0500
commit7e1f89346022a4e90d416dad84ffdda483dbd3b5 (patch)
tree4093f484081815015db43ef2024e3f7335683cd2 /scripts
parent3eafa61f6324c91b4bb8c02a6e54db0f12ef42c2 (diff)
downloadtor-7e1f89346022a4e90d416dad84ffdda483dbd3b5.tar.gz
tor-7e1f89346022a4e90d416dad84ffdda483dbd3b5.zip
lintChanges.py: Two python re usage fixes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/lintChanges.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/maint/lintChanges.py b/scripts/maint/lintChanges.py
index 39fa08bb4a..82c118f07e 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: