mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
more review comments
This commit is contained in:
@@ -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')))
|
||||
|
||||
@@ -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')))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user