<s> import arcpy <EOL> import os <EOL> import sys <EOL> import traceback <EOL> import TestUtilities <EOL> try : <EOL> print ( "<STR_LIT>" ) <EOL> arcpy . AddMessage ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" + str ( TestUtilities . currentPath ) ) <EOL> paths2Check = [ ] <EOL> paths2Check . extend ( [ TestUtilities . geodatabasePath , TestUtilities . scratchPath , TestUtilities . toolboxesPath , TestUtilities . cadrgSourcePath ] ) <EOL> for path2check in paths2Check : <EOL> if os . path . exists ( path2check ) : <EOL> print ( "<STR_LIT>" + path2check ) <EOL> else : <EOL> print ( "<STR_LIT>" + path2check ) <EOL> raise Exception ( '<STR_LIT>' ) <EOL> print ( "<STR_LIT>" ) <EOL> objects2Check = [ ] <EOL> objects2Check . extend ( [ TestUtilities . toolbox , TestUtilities . scratchGDB ] ) <EOL> for object2Check in objects2Check : <EOL> desc = arcpy . Describe ( object2Check ) <EOL> if desc == None : <EOL> print ( "<STR_LIT>" + str ( object2Check ) ) <EOL> arcpy . AddError ( "<STR_LIT>" ) <EOL> raise Exception ( '<STR_LIT>' ) <EOL> else : <EOL> print ( "<STR_LIT>" + desc . Name ) <EOL> print ( "<STR_LIT>" ) <EOL> except arcpy . ExecuteError : <EOL> msgs = arcpy . GetMessages ( ) <EOL> arcpy . AddError ( msgs ) <EOL> print ( msgs ) <EOL> sys . exit ( - <NUM_LIT:1> ) <EOL> except : <EOL> tb = sys . exc_info ( ) [ <NUM_LIT:2> ] <EOL> tbinfo = traceback . format_tb ( tb ) [ <NUM_LIT:0> ] <EOL> pymsg = "<STR_LIT>" + tbinfo + "<STR_LIT>" + str ( sys . exc_info ( ) [ <NUM_LIT:1> ] ) <EOL> msgs = "<STR_LIT>" + arcpy . GetMessages ( ) + "<STR_LIT:\n>" <EOL> arcpy . AddError ( pymsg ) <EOL> arcpy . AddError ( msgs ) <EOL> print ( pymsg + "<STR_LIT:\n>" ) <EOL> print ( msgs ) <EOL> sys . exit ( - <NUM_LIT:1> ) </s>
