Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _parse_pwd_file(self):
succeeded, self.credentials = parse_pwd_file(
self.settings[ConfigParameters.TABPY_PWD_FILE]
)
if succeeded and len(self.credentials) == 0:
logger.error("No credentials found")
succeeded = False
return succeeded
def main():
logging.basicConfig(level=logging.DEBUG, format="%(message)s")
parser = build_cli_parser()
args = parser.parse_args()
if not check_args(args):
parser.print_help()
return
succeeded, credentials = parse_pwd_file(args.pwdfile)
if not succeeded and args.command != "add":
return
if args.password is None:
args.password = generate_password()
process_command(args, credentials)
return