From a777259018913bbf8cd690e3e3c75f6a1d36fb84 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Thu, 14 Apr 2011 17:28:46 +0200 Subject: Helper: use more variables for better readability --- cnucnu/helper.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cnucnu/helper.py') 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): -- cgit