Skip to content

Commit

Permalink
Tiny refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorbaptista committed Aug 27, 2020
1 parent 4fc5328 commit 7a74830
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions public/bin/shellshare
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ try:
except NameError:
input_func = input
if platform.system() == 'Windows':
import shutil
try:
import urllib.request as url_req # for Python 3
except ImportError:
Expand Down Expand Up @@ -183,11 +182,7 @@ if platform.system() == 'Windows':
)
if should_download.lower() not in {'', 'y', 'yes'}:
exit(0)
previous_dir = os.getcwd()
os.chdir(bindir)
script_filename = script_url.split('/')[-1]
url_req.urlretrieve(script_url, script_filename)
os.chdir(previous_dir)
url_req.urlretrieve(script_url, script_path)
else:
# Use OS version of script
script_path = 'script'
Expand Down

0 comments on commit 7a74830

Please sign in to comment.