if testMode: destXML = root + "/dev/test_labDB.xml" print("----------Running in test mode.----------") else: destXML = labdbDev '''validation disabled warning''' if validate: print("validation of output file has been disabled. Be Very Careful!") '''name of host machine this scipt was written for''' #devhost = "slug" devhost = ["slug", "fry"] '''Confirm that this script won't accidently run on the wrong machine''' testHost(devhost) '''Create pjlDB object of each of the relevent xml files''' eqdb = pjlDB.EquipDB(eqdbDev) labdb = pjlDB.LabDB(labdbDev) '''prints version''' if args.version: print("Version " + version) exit() '''Checks that the development version of both key DBs are new or as new as the live versions.''' if not checkTimeStamp(eqdbDev, eqdbData) or not checkTimeStamp( labdbDev, labdbData): if not checkTimeStamp(eqdbDev, eqdbData): print( "Equipment development database is out of synce with the live version. Please update the development version before continuing." ) if not checkTimeStamp(labdbDev, labdbData): print( "Repository development database is out of synce with the live version. Please update the development version before continuing." )
'''Changes the output to a temporary file if script is run in test mode''' if testMode: destXML = root + "/dev/test_equipmentDB.xml" print("----------Running in test mode.----------") else: destXML = eqdbDev '''validation disabled warning''' if validate: print("validation of output file has been disabled. Be Very Careful!") '''name of host machine this scipt was written for''' devHost = ["slug", "fry"] '''Confirm that this script won't accidently run on the wrong machine''' testHost(devHost) '''Create pjlDB object of each of the relevent xml files''' eqdb = pjlDB.EquipDB("/usr/local/master/pjl-web/dev/equipmentDB.xml") labdb = pjlDB.LabDB("/usr/local/master/pjl-web/dev/labDB.xml") '''prints version''' if args.version: print("Version " + version) exit() '''Checks that the development version of both key DBs are new or as new as the live versions.''' if not checkTimeStamp(eqdbDev, eqdbData) or not checkTimeStamp( labdbDev, labdbData): if not checkTimeStamp(eqdbDev, eqdbData): print( "Equipment development database is out of synce with the live version. Please update the development version before continuing." ) if not checkTimeStamp(labdbDev, labdbData): print( "Repository development database is out of synce with the live version. Please update the development version before continuing." )