[hdf-compass] 188/295: add import exception handling for hdf5 data download (since wget is not a Python standard lib)
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository hdf-compass.
commit e3b75d2c3e4a9f963c5eabb36403e6c4ce316b4b
Author: giumas <giumas at yahoo.it>
Date: Mon Oct 26 18:57:24 2015 -0400
add import exception handling for hdf5 data download (since wget is not a Python standard lib)
---
data/hdf5/Download/download_data.py | 41 ++++++++++++++++++++++---------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/data/hdf5/Download/download_data.py b/data/hdf5/Download/download_data.py
index 7e7da41..4670235 100644
--- a/data/hdf5/Download/download_data.py
+++ b/data/hdf5/Download/download_data.py
@@ -4,25 +4,32 @@ Download additional data files from AWS
from __future__ import absolute_import, division, print_function
-import wget
+try:
+ import wget
+
+except ImportError as e:
+ print("missing wget, try to install it: pip install wget: %s" % e)
+ import sys
+
+ sys.exit(1)
files = [
- 'ami_hdf.h5',
- 'attrfile.h5',
- 'countries.h5',
- 'hapmap_compressed.h5',
- 'hdf5_test.h5',
- 'iso++.h5',
- 'sequences.h5',
- 'snps1000_chr22_CEU.h5',
- 'LD_22_5Kx5K_matrix.h5', # 5 MB
- 'shuttle_hdf.h5', # 8 MB
- 'full8_400um.mnc.h5', # 10MB
- 'DOQ.h5', # 45 MB
- 'Sample_Urban_Data.h5', #145 MB
- 'h5pf_md_manygroupnew2.h5', # 155 MB
- 'gz6_SCRIS_npp_d20140522_t0754579_e0802557_b13293__noaa_pop.h5', # 187 MB
- #'NARA_TWR.h5', # 3 GB! Uncomment if you really want this.
+ 'ami_hdf.h5',
+ 'attrfile.h5',
+ 'countries.h5',
+ 'hapmap_compressed.h5',
+ 'hdf5_test.h5',
+ 'iso++.h5',
+ 'sequences.h5',
+ 'snps1000_chr22_CEU.h5',
+ 'LD_22_5Kx5K_matrix.h5', # 5 MB
+ 'shuttle_hdf.h5', # 8 MB
+ 'full8_400um.mnc.h5', # 10MB
+ 'DOQ.h5', # 45 MB
+ 'Sample_Urban_Data.h5', # 145 MB
+ 'h5pf_md_manygroupnew2.h5', # 155 MB
+ 'gz6_SCRIS_npp_d20140522_t0754579_e0802557_b13293__noaa_pop.h5', # 187 MB
+ # 'NARA_TWR.h5', # 3 GB! Uncomment if you really want this.
]
for filename in files:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hdf-compass.git
More information about the debian-science-commits
mailing list