# HG changeset patch # User melissacline # Date 1438039764 25200 # Node ID e81019e3ac9914c2601ff7d420eec760f0d8e651 # Parent ab161b5ac9cc28a75ec4808f7055aa84c3324ab5 Updated synapseGetDataset to look at the filename rather than the (no longer existant) content type field to determine if the data is in zip format diff -r ab161b5ac9cc -r e81019e3ac99 synapseGetDataset.py --- a/synapseGetDataset.py Mon Jul 27 15:55:22 2015 -0700 +++ b/synapseGetDataset.py Mon Jul 27 16:29:24 2015 -0700 @@ -3,6 +3,7 @@ import argparse import json +import re import synapseclient import sys import zipfile @@ -23,7 +24,7 @@ fp.close() def saveData(entity, dataPathname): - if entity.properties['contentType'] == "application/zip": + if re.search("\.zip$", entity.path): zf = zipfile.ZipFile(entity.path) if len(zf.namelist()) > 1: raise InputError(len(zf.namelist())), "Error: more than one input file"