Mercurial > repos > cathywise > truststore_browse_testing
annotate TrustStoreGalaxyBrowse.py @ 14:589f9250e30f
Fix son reading.
author | Catherine Wise <catherine.wise@csiro.au> |
---|---|
date | Wed, 13 May 2015 10:54:07 +1000 |
parents | 11344d545e88 |
children | 7b3039ccf50f |
rev | line source |
---|---|
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
1 """TrustStore downloaded for Galaxy.""" |
0 | 2 from __future__ import division, absolute_import, print_function, unicode_literals |
3 import sys | |
4 import shutil | |
5 import gzip | |
6 import tempfile | |
7 import os | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
8 import json |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
9 import operator |
0 | 10 from py_ts import TrustStoreClient, utils |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
11 from galaxy.datatypes.checkers import util |
0 | 12 |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
13 CLIENT_KEY = "desktop" |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
14 CLIENT_SECRET = "cpU92F1PT7VOCANjSknuCDp4DrubmujoBaF6b0miz8OpKNokEbGMHCaSFK5/lISbBmaaGVCgeADI2A39F3Hkeg==" |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
15 CHUNK_SIZE = 2**20 # 1Mb |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
16 SAFE_CHARS = '.-()[]0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ' |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
17 |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
18 def print_nice(elem, f, depth): |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
19 """Print the file name.""" |
0 | 20 try: |
21 f.write('\t'*depth + elem.name + " (" + str(len(elem.fragments)) + " parts)\n") | |
22 except AttributeError: | |
23 f.write('\t'*depth + elem.name + "\n") | |
24 for child in elem.children: | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
25 print_nice(child, f, depth+1) |
0 | 26 |
27 def check_gzip(file_path): | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
28 """Check if file is gziped.""" |
0 | 29 try: |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
30 temp = open(file_path, "U") |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
31 magic_check = temp.read(2) |
0 | 32 temp.close() |
33 if magic_check != util.gzip_magic: | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
34 return (False, False) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
35 except Exception: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
36 return (False, False) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
37 return (True, True) |
0 | 38 |
39 def ungzip(download, outputFile): | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
40 """Uncompress file.""" |
0 | 41 is_gzipped, is_valid = check_gzip(download) |
42 | |
43 if is_gzipped and not is_valid: | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
44 print("File is compressed (gzip) but not valid.") |
0 | 45 sys.exit(4) |
46 elif is_gzipped and is_valid: | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
47 # We need to uncompress the temp_name file, but BAM files must |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
48 # remain compressed in the BGZF format |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
49 file_handle, uncompressed = tempfile.mkstemp(prefix='data_id_upload_gunzip_', dir=os.path.dirname(outputFile), text=False ) |
0 | 50 gzipped_file = gzip.GzipFile(download, 'rb') |
51 while 1: | |
52 try: | |
53 chunk = gzipped_file.read(CHUNK_SIZE) | |
54 except IOError: | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
55 os.close(file_handle) |
0 | 56 os.remove(uncompressed) |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
57 print('Problem decompressing gzipped data %s %s' % (download, outputFile)) |
0 | 58 sys.exit(4) |
59 if not chunk: | |
60 break | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
61 os.write(file_handle, chunk) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
62 os.close(file_handle) |
0 | 63 gzipped_file.close() |
64 | |
65 shutil.copy(uncompressed, outputFile) | |
66 try: | |
67 os.remove(uncompressed) | |
68 os.remove(download) | |
69 except OSError: | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
70 pass |
0 | 71 else: |
72 shutil.copy(download, outputFile) | |
73 | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
74 def construct_multi_filename(id, name, file_type): |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
75 """ Implementation of *Number of Output datasets cannot be determined until |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
76 tool run* from documentation_. |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
77 .. _documentation: http://wiki.galaxyproject.org/Admin/Tools/Multiple%20Output%20Files |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
78 From https://github.com/mdshw5/galaxy-json-data-source/blob/master/json_data_source.py |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
79 """ |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
80 filename = "%s_%s_%s_%s_%s" % ('primary', id, name, 'visible', file_type) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
81 return filename |
0 | 82 |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
83 def metadata_to_json(dataset_id, filename, name, extesion, ds_type='dataset', primary=False): |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
84 """ Return line separated JSON |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
85 From https://github.com/mdshw5/galaxy-json-data-source/blob/master/json_data_source.py |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
86 """ |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
87 meta_dict = dict(type=ds_type, |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
88 ext=extesion, |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
89 filename=filename, |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
90 name=name, |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
91 metadata={}) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
92 if primary: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
93 meta_dict['base_dataset_id'] = dataset_id |
0 | 94 else: |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
95 meta_dict['dataset_id'] = dataset_id |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
96 return "%s\n" % json.dumps(meta_dict) |
0 | 97 |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
98 def main(): |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
99 properties_file = sys.argv[1] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
100 json_params = None |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
101 metadata_path = None |
14 | 102 all_params = None |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
103 with open(properties_file, 'r') as file_: |
13 | 104 settings = file_.read() |
105 print(settings) | |
106 all_params = json.loads(settings) | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
107 json_params = all_params.get("param_dict") |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
108 metadata_path = all_params["job_config"]["TOOL_PROVIDED_JOB_METADATA_FILE"] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
109 |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
110 output_filename = json_params.get('output', None) |
14 | 111 output_data = all_params.get('output_data') |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
112 extra_files_path, file_name, ext, out_data_name, hda_id, dataset_id = \ |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
113 operator.itemgetter('extra_files_path', 'file_name', 'ext', 'out_data_name', 'hda_id', 'dataset_id')(output_data[0]) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
114 |
10
16b0ceecf1f7
* Open in new window/tab * Apparently URL has to be capitalised (why... who knows, there's no docs).
Catherine Wise <catherine.wise@csiro.au>
parents:
9
diff
changeset
|
115 url_params = json_params['URL'].split(";") |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
116 if len(url_params) < 3: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
117 print("The url we got back is malformed: "+ url_params) |
0 | 118 sys.exit(5) |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
119 short_url = url_params[0] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
120 username = url_params[1] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
121 password = url_params[2] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
122 if "/short" not in short_url: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
123 print("The url we got back is malformed: " + url_params) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
124 sys.exit(5) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
125 kms_url = short_url.split("/short")[0] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
126 |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
127 config = TrustStoreClient.Config( |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
128 None, kms_url, CLIENT_KEY, CLIENT_SECRET, tmpDir='/mnt/galaxy/tmp') |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
129 truststore = TrustStoreClient.TrustStoreClient(headless=False, config=config) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
130 try: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
131 truststore.authenticate(username, password) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
132 except TrustStoreClient.TrustStoreClientAuthenticationException as err: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
133 print(err) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
134 sys.exit(5) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
135 truststore.getPrivateKey('privkey.pem') |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
136 |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
137 path_texts = truststore.lengthenPath(short_url) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
138 if len(path_texts) < 2: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
139 print("The path we got was malformed.") |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
140 sys.exit(3) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
141 paths = path_texts[1:] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
142 store_id = path_texts[0] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
143 |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
144 store = truststore.getStoreByID(store_id) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
145 if store is None: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
146 print("Coudn't find store with that ID, or don't have access.") |
0 | 147 sys.exit(2) |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
148 root = truststore.listDirectory(store) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
149 |
14 | 150 first = True |
151 | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
152 with open(metadata_path, 'wb') as metadata_file: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
153 for path in paths: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
154 locations = utils.Navigation.files_at_path(root, path) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
155 for location in locations: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
156 if not locations: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
157 print("Path not found: " + path) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
158 continue |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
159 filename = "".join(c in SAFE_CHARS and c or '-' for c in location.name) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
160 extension = os.path.splitext(filename)[1] |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
161 name = construct_multi_filename(hda_id, filename, extension) |
14 | 162 target_output_filename = None |
163 if first: | |
164 target_output_filename = file_name | |
165 first = False | |
166 else: | |
167 target_output_filename = os.path.normpath("/".join([extra_files_path, name])) | |
9
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
168 metadata_file.write( |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
169 metadata_to_json(dataset_id, filename, name, extension, target_output_filename)) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
170 download = truststore.getFile(store, location) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
171 if download is None: |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
172 print("File %s not found." % location.name) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
173 sys.exit(4) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
174 ungzip(download, target_output_filename) |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
175 |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
176 |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
177 if __name__ == '__main__': |
0f2a5664c9eb
Actually update downloader (probably not working).
Catherine Wise <catherine.wise@csiro.au>
parents:
0
diff
changeset
|
178 main() |