Merge pull request #639 from merkato/patch-2

Repair bad index checking

Former-commit-id: b80c6e7261
pull/1161/head
Dakota Benjamin 2017-07-27 09:26:44 -04:00 zatwierdzone przez GitHub
commit 5c1e5d3692
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -17,7 +17,8 @@ try:
typ = sys.argv[2]
(fileRoot, fileExt) = os.path.splitext(file)
outFileName = fileRoot + "_" + typ + fileExt
isinstance(typ, ['vari', 'tgi', 'ngrdi'])
if typ not in ['vari', 'tgi', 'ngrdi']:
raise IndexError
except (TypeError, IndexError, NameError):
print bcolors.FAIL + 'Arguments messed up. Check arguments order and index name' + bcolors.ENDC
print 'Usage: ./vegind.py orto index'