/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondCore/Utilities/scripts/popconRun
38 строк
1 KB
Shahzad Malik Muzaffar
[ALCA-DB] py2/3 compatibility:drop use of __future__
22 ноя 2024, 20:15
22 ноя 2024, 20:15
c26340c
Код
Авторство
О чём код?
#!/usr/bin/env python3 '''Script that directs the popcon output to the condition uploader ''' import os import sys from CondCore.Utilities import popcon2dropbox import optparse import argparse def main( argv ): parser = argparse.ArgumentParser() parser.add_argument("job_file", type=str, help="wrapper for popcon jobs") parser.add_argument("-d","--destDb", type=str, help="destination database") parser.add_argument("-t","--destTag", type=str, help="destination database") parser.add_argument("-a","--auth", type=str, help="authentication path (for conddb key and .netrc files)") parser.add_argument("-x","--comment", type=str, help="user comment for the upload") parser.add_argument('--copy', '-c', action='store_true', help='Execute the import with a direct copy.') args = parser.parse_args() if args.job_file is None: print('ERROR: the cfg file name has not been provided.') return -1 if not os.path.exists( args.job_file ): print('ERROR: the specified cfg file %s has not been found in the execution directory' %args.job_file) return -2 if args.destDb is None: print('ERROR: the destination database has not been provided.') return -1 if args.destTag is None: print('ERROR: the destination tag has not been provided.') return -1 return popcon2dropbox.run( args ) if __name__ == '__main__': sys.exit(main(sys.argv))