more review comments

This commit is contained in:
E Rasche
2017-09-25 11:39:15 +02:00
parent 1a57c06d6a
commit 290971ca7a
8 changed files with 13 additions and 19 deletions
@@ -14,6 +14,7 @@ import csv
import os
import sys
import urllib
import requests
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'lib')))
+1
View File
@@ -17,6 +17,7 @@ from __future__ import print_function
import os
import sys
import requests
from xml import etree
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'lib')))
+1 -1
View File
@@ -8,9 +8,9 @@ import os
import sys
import time
from ftplib import FTP
import requests
from urllib import urlretrieve
import requests
from BeautifulSoup import BeautifulSoup
from util import get_bed_from_genbank, get_bed_from_glimmer3, get_bed_from_GeneMarkHMM, get_bed_from_GeneMark
+6 -15
View File
@@ -11,6 +11,7 @@ import argparse
import os
import sys
import tempfile
import requests
sys.path.insert(1, os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, 'lib'))
@@ -98,21 +99,11 @@ def main(options):
download_url = export_dict['download_url']
download_dir = os.path.abspath(options.download_dir)
file_path = os.path.join(download_dir, repositories_archive_filename)
src = None
dst = None
try:
src = requests.get(download_url, stream=True)
with open(file_path, 'wb') as handle:
for chunk in src.iter_content(chunk_size=CHUNK_SIZE):
if chunk:
handle.write(chunk)
except:
raise
finally:
if src:
src.close()
if dst:
dst.close()
src = requests.get(download_url, stream=True)
with open(file_path, 'wb') as dst:
for chunk in src.iter_content(chunk_size=CHUNK_SIZE):
if chunk:
dst.write(chunk)
print "Successfully exported revision ", options.changeset_revision, " of repository ", options.name, " owned by ", options.owner
print "to location ", file_path
else: