def main(args): while True: try: pwd = getpass.getpass("Confluence password for %s: "\ % getpass.getuser()) rc = cli.login(getpass.getuser(), pwd, page.SPACE_KEY) break except cli.AuthFailure: pass if args.page: cid = page.extractPageId(args.page) if not cid: return False else: while True: try: cid = page.askForPageId() break except fields.AbortPage: print print "-ERROR- Page aborted." except KeyboardInterrupt: return False return add_efuse(cid=cid, efuse=args.efuse, force=args.force, dryrun=args.dryrun)
def main(args): try: while True: try: pwd = getpass.getpass("Confluence password for %s: "\ % getpass.getuser()) rc = cli.login(getpass.getuser(), pwd, page.SPACE_KEY) break except cli.AuthFailure: pass if args.page: cid = page.extractPageId(args.page) if not cid: return False else: while True: cid = page.askForPageId() break return updateProperty(cid) except KeyboardInterrupt: print return False
def main(): print "Check device pages in the hardware database in Confluence." print "Type control-D or control-C at a prompt to terminate." print pwd = getpass.getpass("Confluence password for %s: " % getpass.getuser()) rc = cli.login(getpass.getuser(), pwd, page.SPACE_KEY) if rc: return 1 while True: print ans = raw_input("Enter page ID (or URL with page ID in it): ") cid = page.extractPageId(ans) if cid is None: print "Could not find a page ID in that." elif check.validDevicePage(cid): print "OK"
def main(args): try: while True: try: pwd = getpass.getpass("Confluence password for %s: "\ % getpass.getuser()) rc = cli.login(getpass.getuser(), pwd, page.SPACE_KEY) break except cli.AuthFailure: pass cid = page.extractPageId(args.page) if not cid: return False return add_label(cid=cid, label=args.tag)
def main(args): print """ Type control-D or control-C at a prompt to terminate. While making a page type a period to abort the page. """ while True: try: pwd = getpass.getpass("Confluence password for %s: "\ % getpass.getuser()) rc = cli.login(getpass.getuser(), pwd, page.SPACE_KEY) break except cli.AuthFailure: pass try: if args.page: cid = page.extractPageId(args.page) if not cid: return False return init_page(cid=cid, devtype=args.board, tag=args.tag, status=args.status, site=args.loc, dryrun=args.dryrun) # If the page wasn't specified on the command line, # just keep asking for new pages. else: while True: cid = page.askForPageId() init_page(cid=cid, devtype=args.board, tag=args.tag, status=args.status, site=args.loc, dryrun=args.dryrun) except fields.AbortPage: print print "-ERROR- Page aborted." except KeyboardInterrupt: print return False