From 4713c9b53c91c81280331a7cb6487bd955f67477 Mon Sep 17 00:00:00 2001 From: Bhuvan Arumugam Date: Thu, 26 Jul 2012 08:19:18 -0700 Subject: Fix errors reported by pyflakes. * openstack/common/setup.py get_reqs_from_files(): Remove unused variable. get_reqs_from_files(): Use local variables in a conventional way, to prevent errors like: local variable 'datestamp' is assigned to but never used. Change-Id: I44e137d383b96e1601b7bded1e36e84ff14a8f68 --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 59f255d..628f5e3 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,6 @@ def canonicalize_emails(changelog, mapping): # Get requirements from the first file that exists def get_reqs_from_files(requirements_files): - reqs_in = [] for requirements_file in requirements_files: if os.path.exists(requirements_file): return open(requirements_file, 'r').read().split('\n') @@ -144,8 +143,8 @@ def _get_git_next_version_suffix(branch_name): # where the bit after the last . is the short sha, and the bit between # the last and second to last is the revno count (revno, sha) = post_version.split(".")[-2:] - first_half = "%(milestonever)s~%(datestamp)s" % locals() - second_half = "%(revno_prefix)s%(revno)s.%(sha)s" % locals() + first_half = "%s~%s" % (milestonever, datestamp) + second_half = "%s%s.%s" % (revno_prefix, revno, sha) return ".".join((first_half, second_half)) -- cgit v1.2.1