PEP-8 fixes.

This commit is contained in:
Nicola Soranzo
2015-06-24 12:12:27 +01:00
parent f98d4b27a0
commit 56f9303fce
2 changed files with 9 additions and 8 deletions
+1
View File
@@ -1,3 +1,4 @@
cron/parse_builds.py
lib/galaxy/auth
lib/galaxy/config.py
lib/galaxy/datatypes/data.py
+8 -8
View File
@@ -15,6 +15,7 @@ try:
except IndexError:
URL = "http://genome.cse.ucsc.edu/cgi-bin/das/dsn"
def getbuilds(url):
try:
page = urllib.urlopen(url)
@@ -35,21 +36,20 @@ def getbuilds(url):
print "?\tunspecified (?)"
for dsn in tree:
build = dsn.find("SOURCE").attrib['id']
description = dsn.find("DESCRIPTION").text.replace(" - Genome at UCSC","").replace(" Genome at UCSC","")
description = dsn.find("DESCRIPTION").text.replace(" - Genome at UCSC", "").replace(" Genome at UCSC", "")
fields = description.split(" ")
temp = fields[0]
for i in range(len(fields)-1):
if temp == fields[i+1]:
fields.pop(i+1)
for i in range(len(fields) - 1):
if temp == fields[i + 1]:
fields.pop(i + 1)
else:
temp = fields[i+1]
temp = fields[i + 1]
description = " ".join(fields)
yield [build,description]
yield [build, description]
if __name__ == "__main__":
if len(sys.argv) > 1:
URL = sys.argv[1]
for build in getbuilds(URL):
print build[0]+"\t"+build[1]+" ("+build[0]+")"
print build[0] + "\t" + build[1] + " (" + build[0] + ")"