

def main():
    ' main '
    try:
        arcpy.AddMessage('Getting database qualifier string ...')
        qualifierString = GetQualifierName(inputTDSFeatureDataset)
        if (DEBUG is True):
            arcpy.AddMessage(('qualifier string: ' + qualifierString))
        fqClassesToMerge = [str((fqClassesToMerge + i)) for i in FEATURECLASSES_TO_MERGE]
        if (DEBUG is True):
            arcpy.AddMessage(('fqClassesToMerge: ' + str(fqClassesToMerge)))
        workspace = os.path.dirname(inputTDSFeatureDataset)
        tdsFeatureClasses = FeatureClassesFromWorkspace(inputTDSFeatureDataset)
        if (DEBUG is True):
            arcpy.AddMessage(('tdsFeatureClasses: ' + str(tdsFeatureClasses)))
        arcpy.AddMessage('Building list of input features ...')
        newList = [str(os.path.join(workspace, os.path.basename(inputTDSFeatureDataset), fc)) for fc in tdsFeatureClasses if (fc in fqClassesToMerge)]
        if (DEBUG is True):
            arcpy.AddMessage(('newList: ' + str(newList)))
        target = os.path.join(inputMAOTWorkspace, 'CombinedVegetationCoverage')
        if (DEBUG is True):
            arcpy.AddMessage(('target: ' + str(target)))
        arcpy.AddMessage('Merging features to output (this may take some time)...')
        arcpy.Merge_management(newList, target)
        arcpy.AddMessage('Setting output ...')
        arcpy.SetParameter(2, target)
    except arcpy.ExecuteError:
        msgs = arcpy.GetMessages()
        arcpy.AddError(msgs)
        print(msgs)
    except:
        tb = sys.exc_info()[2]
        tbinfo = traceback.format_tb(tb)[0]
        pymsg = ((('PYTHON ERRORS:\nTraceback info:\n' + tbinfo) + '\nError Info:\n') + str(sys.exc_info()[1]))
        msgs = (('ArcPy ERRORS:\n' + arcpy.GetMessages()) + '\n')
        arcpy.AddError(pymsg)
        arcpy.AddError(msgs)
        print((pymsg + '\n'))
        print(msgs)

dataset/ETHPy150Open Esri/solutions-geoprocessing-toolbox/suitability/toolboxes/scripts/GenerateIntermediateLayers.py main/VarMisuse@56/96 `qualifierString`->`fqClassesToMerge`