Skip to content

Commit

Permalink
Merge pull request #191 from psnbaba/viewer_fix
Browse files Browse the repository at this point in the history
added check for using arbitrary name in argument
  • Loading branch information
prabhuramachandran committed Mar 23, 2019
2 parents 3101f3f + feffce7 commit 1e59cb3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pysph/tools/mayavi_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,13 @@ def main(args=None):
scripts.append(arg)
continue
elif arg.endswith(output_formats):
try:
_sort_key(arg)
except ValueError:
print("Error: file name is not supported")
print("filename format accepted is *_number.npz"
" or *_number.hdf5")
sys.exit(1)
files.extend(glob.glob(arg))
continue
elif os.path.isdir(arg):
Expand Down

0 comments on commit 1e59cb3

Please sign in to comment.