fixed os.path.splitext bug when using STDIN input

This commit is contained in:
Philip Eisenlohr 2015-08-12 21:56:37 +00:00
parent 3e65c324de
commit 1976cf44c1
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ if filenames == []: filenames = [None]
for name in filenames: for name in filenames:
try: try:
table = damask.ASCIItable(name = name, table = damask.ASCIItable(name = name,
outname = os.path.splitext(name)[0]+'.geom', outname = os.path.splitext(name)[0]+'.geom' if name else name,
buffered = False) buffered = False)
except: continue except: continue
table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else '')) table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else ''))