kopia lustrzana https://github.com/OpenDroneMap/ODM
Repair bad index checking
isinstance(object, classinfo) checks only if object has correct python type, not value. Let's try this with more traditional method ;)pull/639/head
rodzic
6887f44bda
commit
37e49b132c
contrib/visveg
|
@ -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'
|
||||
|
|
Ładowanie…
Reference in New Issue