[or-cvs] [pytorctl/master 5/5] Fix Tor version regular expression.
mikeperry at torproject.org
mikeperry at torproject.org
Fri Aug 20 20:46:12 UTC 2010
Author: Harry Bock <hbock at ele.uri.edu>
Date: Mon, 9 Aug 2010 02:14:33 -0400
Subject: Fix Tor version regular expression.
Commit: 737fbe35724f31d11529f7adea3a2a20c01378cb
Need to escape the dot character to get the intended
behavior.
---
TorCtl.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/TorCtl.py b/TorCtl.py
index 1d58127..8aa498b 100755
--- a/TorCtl.py
+++ b/TorCtl.py
@@ -290,7 +290,7 @@ class RouterVersion:
to check for newer, older, or equivalent versions. """
def __init__(self, version):
if version:
- v = re.search("^(\d+).(\d+).(\d+).(\d+)", version).groups()
+ v = re.search("^(\d+)\.(\d+)\.(\d+)\.(\d+)", version).groups()
self.version = int(v[0])*0x1000000 + int(v[1])*0x10000 + int(v[2])*0x100 + int(v[3])
self.ver_string = version
else:
--
1.7.1
More information about the tor-commits
mailing list