[125592] users/g5pw/pypi2port/pypi2port.py
g5pw at macports.org
g5pw at macports.org
Mon Sep 22 02:54:13 PDT 2014
Revision: 125592
https://trac.macports.org/changeset/125592
Author: g5pw at macports.org
Date: 2014-09-22 02:54:13 -0700 (Mon, 22 Sep 2014)
Log Message:
-----------
No need to use mutable types for comparisons
Modified Paths:
--------------
users/g5pw/pypi2port/pypi2port.py
Modified: users/g5pw/pypi2port/pypi2port.py
===================================================================
--- users/g5pw/pypi2port/pypi2port.py 2014-09-22 09:54:09 UTC (rev 125591)
+++ users/g5pw/pypi2port/pypi2port.py 2014-09-22 09:54:13 UTC (rev 125592)
@@ -137,7 +137,7 @@
if checksum:
# print values
for value in values:
- if value['filename'].split('.')[-1] in ['gz', 'zip']:
+ if value['filename'].split('.')[-1] in ('gz', 'zip'):
return fetch(pkg_name, value)
else:
for value in values:
@@ -154,7 +154,7 @@
return
values = client.release_urls(pkg_name, pkg_version)
for value in values:
- if value['filename'].split('.')[-1] in ['gz', 'zip']:
+ if value['filename'].split('.')[-1] in ('gz', 'zip'):
fetch(pkg_name, value)
try:
with open('./sources/python/py-'
@@ -168,7 +168,7 @@
ignore_errors=True)
items = os.listdir('./sources/python/py-' + pkg_name)
for item in items[:]:
- if item.split('.')[-1] not in ['gz', 'zip']:
+ if item.split('.')[-1] not in ('gz', 'zip'):
os.remove('./sources/python/py-'
+ pkg_name + '/' + item)
items.remove(item)
@@ -184,7 +184,7 @@
ignore_errors=True)
items = os.listdir('./sources/python/py-'+pkg_name)
for item in items[:]:
- if item.split('.')[-1] not in ['gz', 'zip']:
+ if item.split('.')[-1] not in ('gz', 'zip'):
os.remove('./sources/python/py-'+pkg_name+'/'+item)
items.remove(item)
if not items:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140922/6a588354/attachment.html>
More information about the macports-changes
mailing list