Use endswith rather than os.path.splitext

This commit is contained in:
Paul Romano 2015-06-07 10:09:31 +07:00
parent 6a862d82af
commit 4552b5b1ab

View file

@ -48,7 +48,7 @@ def main():
# Make sure that the output filename ends with '.pvtp'.
if not args.out:
args.out = 'tracks.pvtp'
elif os.path.splitext(args.out)[1] != '.pvtp':
elif not args.out.endswith('.pvtp'):
args.out += '.pvtp'
# Import HDF library if HDF files are present