Skip to content

Commit

Permalink
Fixed ArcGIS Pro bug #35
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Mar 11, 2022
1 parent afa1da6 commit 1878f42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WBT/PRE/automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def get_book_tag(tool_name, category):
line = " if os.path.exists('./{}'.format(unzipped_dir_name)):\n"
if line.strip() == "shutil.rmtree(f'./{unzipped_dir_name}')":
line = " shutil.rmtree('./{}'.format(unzipped_dir_name))\n"
if "urllib.request" in line:
if "urllib.request" in line and "import" not in line:
line = line.replace("urllib.request", "urlopen")

outlines.append(line)
Expand Down
2 changes: 1 addition & 1 deletion WBT/whitebox_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
if sys.version_info.major == 2:
import urllib2 as urlopen
else:
import urlopen as urlopen
import urllib.request as urlopen

running_windows = platform.system() == 'Windows'

Expand Down

0 comments on commit 1878f42

Please sign in to comment.