diff options
author | Olav Vitters <olav@vitters.nl> | 2017-04-02 14:12:41 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2017-04-02 14:12:41 +0200 |
commit | 21a305f987170831cb6ea91e283d38550e4a30d4 (patch) | |
tree | d9cd1a6816c321a76619c2d7cf4600699355db1c | |
parent | 4d7a4c9e64ff893cd9ce59b9b9b90b2298674ad2 (diff) | |
download | mgagnome-21a305f987170831cb6ea91e283d38550e4a30d4.tar mgagnome-21a305f987170831cb6ea91e283d38550e4a30d4.tar.gz mgagnome-21a305f987170831cb6ea91e283d38550e4a30d4.tar.bz2 mgagnome-21a305f987170831cb6ea91e283d38550e4a30d4.tar.xz mgagnome-21a305f987170831cb6ea91e283d38550e4a30d4.zip |
safer major minor string parsing
-rwxr-xr-x | mgagnome | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -158,10 +158,11 @@ def get_majmin(version, module=None): def get_safe_max_version(version, module=None): - if version is None or not re_majmin.match(version): + m = re_majmin.match(version) + if version is None or not m: return None - majmin = get_majmin(version, module) + majmin = get_majmin(m.group(1), module) min_nr = int(majmin[1]) |