diff data_manager/data_manager.py @ 4:cef5c909ccb8 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_ncbi_taxonomy/ commit 79946a95eb9a4c98fde04fa2cb3bc6a31a28e407"
author iuc
date Tue, 07 Jul 2020 00:05:59 +0000
parents f7b443a73374
children eaca3e270bf6
line wrap: on
line diff
--- a/data_manager/data_manager.py	Mon Jul 06 23:29:44 2020 +0000
+++ b/data_manager/data_manager.py	Tue Jul 07 00:05:59 2020 +0000
@@ -5,7 +5,12 @@
 import shutil
 import tarfile
 import zipfile
-from urllib.request import Request, urlopen
+try:
+    # For Python 3.0 and later
+    from urllib.request import Request, urlopen
+except ImportError:
+    # Fall back to Python 2 imports
+    from urllib2 import Request, urlopen
 
 
 def url_download(url, workdir):