Skip to content

Commit 5184812

Browse files
committed
changing os.rename to shutil.move to close #65
1 parent 0929dfd commit 5184812

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ RUN /opt/conda/bin/pip install setuptools && \
1515
/opt/conda/bin/pip install -r requirements.txt && \
1616
/opt/conda/bin/pip install pyasn1==0.4.1 && \
1717
/opt/conda/bin/python setup.py sdist && \
18-
/opt/conda/bin/python setup.py install
18+
/opt/conda/bin/python setup.py install && \
19+
apt-get clean

singularity/hub/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from requests.exceptions import HTTPError
2828

2929
from singularity.logger import bot
30+
import shutil
3031
import requests
3132
import tempfile
3233
import json
@@ -154,7 +155,7 @@ def download(self,url,file_name,headers=None,show_progress=True):
154155
if isinstance(response, HTTPError):
155156
bot.error("Error downloading %s, exiting." %url)
156157
sys.exit(1)
157-
os.rename(tmp_file, file_name)
158+
shutil.move(tmp_file, file_name)
158159
return file_name
159160

160161

0 commit comments

Comments
 (0)