[GRASS-SVN] r71978 - grass/trunk/gui/wxpython/startup
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 26 13:07:52 PST 2017
Author: martinl
Date: 2017-12-26 13:07:52 -0800 (Tue, 26 Dec 2017)
New Revision: 71978
Modified:
grass/trunk/gui/wxpython/startup/locdownload.py
Log:
wxGUI/downloc: fix typos
Modified: grass/trunk/gui/wxpython/startup/locdownload.py
===================================================================
--- grass/trunk/gui/wxpython/startup/locdownload.py 2017-12-26 19:55:42 UTC (rev 71977)
+++ grass/trunk/gui/wxpython/startup/locdownload.py 2017-12-26 21:07:52 UTC (rev 71978)
@@ -188,7 +188,7 @@
))
# based on g.extension, potentially move to library
-def download_end_extract(source):
+def download_and_extract(source):
"""Download a file (archive) from URL and uncompress it"""
tmpdir = tempfile.mkdtemp()
Debug.msg(1, 'Tmpdir: {}'.format(tmpdir))
@@ -208,7 +208,7 @@
ext = "tar.gz"
else:
ext = source.rsplit('.', 1)[1]
- archive_name = os.path.join(tmpdir, 'extension.' + ext)
+ archive_name = os.path.join(tmpdir, 'location.' + ext)
urlretrieve(source, archive_name, reporthook)
# TODO: error handling for urlretrieve
extract_tar(name=archive_name, directory=directory, tmpdir=tmpdir)
@@ -227,7 +227,7 @@
try:
# TODO: the unpacking could go right to the path (but less
# robust) or replace copytree here with move
- directory = download_end_extract(source=url)
+ directory = download_and_extract(source=url)
destination = os.path.join(database, name)
if not is_location_valid(directory):
return _("Downloaded location is not valid")
More information about the grass-commit
mailing list