MCPcopy
hub / github.com/psycopg/psycopg / main

Function main

tools/update_backer.py:70–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68
69
70def main():
71 opt = parse_cmdline()
72 logger.info("reading %s", opt.file)
73 yaml = YAML(typ="rt")
74 filedata = yaml.load(opt.file)
75
76 for username in opt.add or ():
77 add_entry(opt, filedata, username)
78
79 for username in opt.update or ():
80 update_entry(opt, filedata, username)
81
82 if opt.update_all:
83 for entry in filedata:
84 update_entry(opt, filedata, entry)
85
86 # yamllint happy
87 yaml.explicit_start = True
88 logger.info("writing %s", opt.file)
89 yaml.dump(filedata, opt.file)
90
91
92def parse_cmdline():

Callers 1

update_backer.pyFile · 0.70

Calls 6

add_entryFunction · 0.85
update_entryFunction · 0.85
parse_cmdlineFunction · 0.70
infoMethod · 0.45
loadMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected