summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorBhuvan Arumugam <bhuvan@apache.org>2012-07-26 08:19:18 -0700
committerBhuvan Arumugam <bhuvan@apache.org>2012-08-01 09:43:22 -0700
commit4713c9b53c91c81280331a7cb6487bd955f67477 (patch)
tree13c561f9afc5273c76b8793b904663999be64fd6 /setup.py
parent9a000d1850a88d7545d8ead64b1d8d214138872d (diff)
downloadpbr-4713c9b53c91c81280331a7cb6487bd955f67477.tar.gz
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
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py5
1 files changed, 2 insertions, 3 deletions
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))