Mercurial > repos > cathywise > truststore_import
comparison TrustStoreGalaxyImport.py @ 24:7b1720b6acf2
remove extra files
| author | Catherine Wise <catherine.wise@csiro.au> |
|---|---|
| date | Tue, 14 Jan 2014 15:49:55 +1100 |
| parents | cf4cf95e6678 |
| children | 20dc961b7949 |
comparison
equal
deleted
inserted
replaced
| 23:cf4cf95e6678 | 24:7b1720b6acf2 |
|---|---|
| 1 import sys | 1 import sys |
| 2 import shutil | 2 import shutil |
| 3 import gzip | 3 import gzip |
| 4 import tempfile | 4 import tempfile |
| 5 import os | |
| 5 from py_ts import TrustStoreClient, ts_utils | 6 from py_ts import TrustStoreClient, ts_utils |
| 6 from galaxy.datatypes.checkers import * | 7 from galaxy.datatypes.checkers import * |
| 7 | 8 |
| 8 def printNice(elem, f, depth): | 9 def printNice(elem, f, depth): |
| 9 try: | 10 try: |
| 80 os.write(fd, chunk) | 81 os.write(fd, chunk) |
| 81 os.close(fd) | 82 os.close(fd) |
| 82 gzipped_file.close() | 83 gzipped_file.close() |
| 83 | 84 |
| 84 shutil.copy(uncompressed, outputFile) | 85 shutil.copy(uncompressed, outputFile) |
| 86 try: | |
| 87 os.remove(uncompressed) | |
| 88 except OSError: | |
| 89 pass | |
| 85 else: | 90 else: |
| 86 shutil.copy(download, outputFile) | 91 shutil.copy(download, outputFile) |
| 87 else: | 92 else: |
| 88 print "File not found" | 93 print "File not found" |
| 89 sys.exit(4) | 94 sys.exit(4) |
