def maint_db_diagnostic(dbo): try: move, vacc, med, medt = dbupdate.diagnostic(dbo) print "Removed:\n%d orphaned movements,\n%d orphaned vaccinations\n%d orphaned medical records\n%d orphaned treatments" % (move, vacc, med, medt) except: em = str(sys.exc_info()[0]) al.error("FAIL: uncaught error running maint_db_diagnostic: %s" % em, "cron.maint_animal_figures", dbo, sys.exc_info())
def maint_db_diagnostic(dbo): try: d = dbupdate.diagnostic(dbo) for k, v in d.iteritems(): print("%s: %s" % (k, v)) except: em = str(sys.exc_info()[0]) al.error("FAIL: uncaught error running maint_db_diagnostic: %s" % em, "cron.maint_db_diagnostic", dbo, sys.exc_info())
def maint_db_diagnostic(dbo): try: d = dbupdate.diagnostic(dbo) for k, v in d.iteritems(): print "%s: %s" % (k, v) except: em = str(sys.exc_info()[0]) al.error("FAIL: uncaught error running maint_db_diagnostic: %s" % em, "cron.maint_db_diagnostic", dbo, sys.exc_info())
def maint_db_diagnostic(dbo): try: move, vacc, med, medt = dbupdate.diagnostic(dbo) print "Removed:\n%d orphaned movements,\n%d orphaned vaccinations\n%d orphaned medical records\n%d orphaned treatments" % ( move, vacc, med, medt, ) except: em = str(sys.exc_info()[0]) al.error( "FAIL: uncaught error running maint_db_diagnostic: %s" % em, "cron.maint_animal_figures", dbo, sys.exc_info(), )