diff options
author | Till Maas <opensource@till.name> | 2011-04-14 17:28:46 +0200 |
---|---|---|
committer | Till Maas <opensource@till.name> | 2011-04-14 17:28:46 +0200 |
commit | a777259018913bbf8cd690e3e3c75f6a1d36fb84 (patch) | |
tree | 46f514f514b9fa4b1f081fe66d86548cf742e27d /cnucnu/helper.py | |
parent | 852bc954fa63a623fb97f1cf196a663c5848657c (diff) | |
download | cnucnu-a777259018913bbf8cd690e3e3c75f6a1d36fb84.tar.gz cnucnu-a777259018913bbf8cd690e3e3c75f6a1d36fb84.tar.xz cnucnu-a777259018913bbf8cd690e3e3c75f6a1d36fb84.zip |
Helper: use more variables for better readability
Diffstat (limited to 'cnucnu/helper.py')
-rw-r--r-- | cnucnu/helper.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cnucnu/helper.py b/cnucnu/helper.py index 14ed28e..6c4a530 100644 --- a/cnucnu/helper.py +++ b/cnucnu/helper.py @@ -194,13 +194,15 @@ def split_rc(version): if not match: return (version, "", "") - rc = match.group(3) - if rc: - return (match.group(1), rc, match.group(4)) + rc_str = match.group(3) + if rc_str: + v = match.group(1) + rc_num = match.group(4) + return (v, rc_str, rc_num) else: # if version contains a dash, but no release candidate string is found, v != version, therefore use version here # Example version: 1.8.23-20100128-r1100 - # Then: v=1.8.23, but rc="" + # Then: v=1.8.23, but rc_str="" return (version, "", "") def get_rc(release): |