splitext includes leading dot
This commit is contained in:
parent
326e3d0824
commit
b5e4e42505
|
@ -422,7 +422,7 @@ class Geom():
|
||||||
ext = os.path.splitext(fname)[1]
|
ext = os.path.splitext(fname)[1]
|
||||||
if ext == '':
|
if ext == '':
|
||||||
name = fname + '.' + writer.GetDefaultFileExtension()
|
name = fname + '.' + writer.GetDefaultFileExtension()
|
||||||
elif ext == writer.GetDefaultFileExtension():
|
elif ext[1:] == writer.GetDefaultFileExtension():
|
||||||
name = fname
|
name = fname
|
||||||
else:
|
else:
|
||||||
raise ValueError("unknown extension {}".format(ext))
|
raise ValueError("unknown extension {}".format(ext))
|
||||||
|
|
Loading…
Reference in New Issue