diff --git a/Configuration/Geometry/python/generateGeometry.py b/Configuration/Geometry/python/generateGeometry.py index af5ef6c4d33bf..302e080ad8cd6 100644 --- a/Configuration/Geometry/python/generateGeometry.py +++ b/Configuration/Geometry/python/generateGeometry.py @@ -29,10 +29,10 @@ def __init__(self, scriptName, detectorVersionDefault, detectorPrefix, detectorY def generateGeom(self, detectorTuple, args): detectorVersion = self.detectorPrefix+str(args.detectorVersionManual) # reverse dict search if overall D# specified - if args.v_detector>0: + if args.v_detector!=self.detectorVersionType(0): detectorVersion = self.detectorPrefix+str(args.v_detector) if detectorVersion in self.detectorVersionDict.values(): - detectorTuple = self.detectorVersionDict.keys()[self.detectorVersionDict.values().index(detectorVersion)] + detectorTuple = list(self.detectorVersionDict.keys())[list(self.detectorVersionDict.values()).index(detectorVersion)] else: print("Unknown detector "+detectorVersion) sys.exit(1)