def regen_identity(): uuid = config.get_uuid() if uuid == "": uuid = generate_uuid() psw = gen_random_text(6) config.set_uuid_psw(uuid, psw) gen_identity_img()
def gen_identity(): if config.get_uuid() == "": uuid = generate_uuid() psw = gen_random_text(6) config.set_uuid_psw(uuid, psw) qrimg = os.path.join(config.PROJECT_DIR, config.get_identity_path()) if not os.path.isfile(qrimg): gen_identity_img(qrimg)