Closed GoogleCodeExporter closed 9 years ago
Fix:
--- test/_linux.py
+++ test/_linux.py
@@ -120,7 +120,7 @@
def test_cpu_times(self):
fields = psutil.cpu_times()._fields
- kernel_ver = re.findall('\d.\d.\d', os.uname()[2])[0]
+ kernel_ver = re.findall('\d+.\d+.\d+', os.uname()[2])[0]
kernel_ver_info = tuple(map(int, kernel_ver.split('.')))
# steal >= 2.6.11
# guest >= 2.6.24
Original comment by Arfrever...@gmail.com
on 23 Aug 2013 at 2:07
Actually '.' also should be escaped:
--- test/_linux.py
+++ test/_linux.py
@@ -120,7 +120,7 @@
def test_cpu_times(self):
fields = psutil.cpu_times()._fields
- kernel_ver = re.findall('\d.\d.\d', os.uname()[2])[0]
+ kernel_ver = re.findall('\d+\.\d+\.\d+', os.uname()[2])[0]
kernel_ver_info = tuple(map(int, kernel_ver.split('.')))
# steal >= 2.6.11
# guest >= 2.6.24
Original comment by Arfrever...@gmail.com
on 23 Aug 2013 at 2:09
Pushed in revision 25339c50d117. Thanks.
Original comment by g.rodola
on 24 Aug 2013 at 5:56
Original issue reported on code.google.com by
Arfrever...@gmail.com
on 23 Aug 2013 at 2:03