Commit dc7c0b9c authored by aknecht2's avatar aknecht2
Browse files

Changed overwrite default to True. Adjusted download to the correct md5 value.

parent 4d651c4d
......@@ -7,7 +7,7 @@ parser.add_argument("-u", "--url", dest="url", required=True, help="Target url."
parser.add_argument("-p", "--path", dest="path", required=True, help="Local path to file.")
parser.add_argument("-t", "--url_type", dest="url_type", default="ftp://", help="Type of url to access.")
parser.add_argument("-r", "--retries", dest="retries", default=3, type=int, help="Number of retries.")
parser.add_argument("-o", "--overwrite", dest="overwrite", default=False, action="store_true", help="Overwrite local file if exists.")
parser.add_argument("-n", "--overwrite", dest="overwrite", default=True, action="store_false", help="Dont' overwrite local file if exists.")
parser.add_argument("-m", "--md5", dest="md5", help="Check md5 value against passed value.")
args = parser.parse_args()
......
......@@ -13,7 +13,7 @@ def progress(current, end, length=20):
sys.stdout.flush()
def downloadFile(url, localpath, urltype="ftp://", retries=3, overwrite=False, checkmd5=False, md5=None):
def downloadFile(url, localpath, urltype="ftp://", retries=3, overwrite=True, checkmd5=False, md5=None):
success = False
if url[:7] == "http://":
urltype = ""
......
......@@ -253,7 +253,7 @@ class Workflow(object):
self.files[output_name] = output_file
job = Job(self.executables["download_fastq.py"])
job.uses(output_file, link=Link.OUTPUT, transfer=True)
job.addArguments("-u", f["url"], "-p", output_file, "-t http://", "-m", f["content_md5sum"])
job.addArguments("-u", f["url"], "-p", output_file, "-t http://", "-m", f["md5sum"])
self.jobs[output_name] = job
self.dax.addJob(job)
return
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment