lib: Fix silent assertitons
There are a couple of assert statements in the codebase which can make jw-pkg fail without any detail whatsoever if --backtrace is not specified, fix that.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
120a6e4d34
commit
3ac3aff997
7 changed files with 19 additions and 12 deletions
|
|
@ -59,7 +59,7 @@ class CmdListRepos(Cmd): # export
|
|||
'-H', 'X-GitHub-Api-Version: 2022-11-28',
|
||||
]
|
||||
if password is not None:
|
||||
assert username is not None
|
||||
assert username is not None, f'Assertion failed: username is empty but password isn\'t for "{args.base_url}"'
|
||||
cmd_input = (f'-u {username}:{password}').encode('utf-8')
|
||||
curl_args.extend(['-K-'])
|
||||
curl_args.append(f'https://api.github.com/users/{args.from_owner}/repos')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue