mirror of https://github.com/vitalif/openscad
Handle cwd as outputdir
parent
d066648390
commit
0dd3ac272b
|
@ -29,12 +29,12 @@ def createImport(inputfile, scadfile):
|
||||||
print ('createImport: ' + inputfile + " " + scadfile)
|
print ('createImport: ' + inputfile + " " + scadfile)
|
||||||
outputdir = os.path.dirname(scadfile)
|
outputdir = os.path.dirname(scadfile)
|
||||||
try:
|
try:
|
||||||
if not os.path.exists(outputdir): os.mkdir(outputdir)
|
if outputdir and not os.path.exists(outputdir): os.mkdir(outputdir)
|
||||||
f = open(scadfile,'w')
|
f = open(scadfile,'w')
|
||||||
f.write('import("'+inputfile+'");'+os.linesep)
|
f.write('import("'+inputfile+'");'+os.linesep)
|
||||||
f.close()
|
f.close()
|
||||||
except:
|
except:
|
||||||
failquit('failure while opening/writing ' + scadfile)
|
failquit('failure while opening/writing ' + scadfile + ': ' + str(sys.exc_info()))
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue