Small fixes for importStepFromURL(url) function...

This commit is contained in:
Simon Huskier 2015-12-01 08:50:33 +08:00
parent e0832ec3eb
commit 51a8d35645

View File

@ -80,9 +80,8 @@ def importStepFromURL(url):
#Now read and return the shape #Now read and return the shape
try: try:
webFile = urlreader.urlopen(url) webFile = urlreader.urlopen(url)
if webFile.getcode
if platform.system() == 'Windows': if platform.system() == 'Windows':
localFileName = os.environ['TEMP']+url.split('/')[-1] localFileName = os.environ['TEMP']+'/'+url.split('/')[-1]
else: else:
localFileName = "/tmp/"+url.split('/')[-1] localFileName = "/tmp/"+url.split('/')[-1]
localFile = open(localFileName, 'w') localFile = open(localFileName, 'w')