Fix function missing parameter
By putting main into a function, other_state is no longer a global. Some functions depended on this global dict, so pass it as a parameter instead.
This commit is contained in:
parent
c2d15ea593
commit
f79849340e
1 changed files with 6 additions and 1 deletions
|
@ -1664,7 +1664,10 @@ def build_print_pkg_info(pkgs: tuple[str], other_state: dict[str, any]):
|
||||||
|
|
||||||
|
|
||||||
def test_gpg_passphrase(
|
def test_gpg_passphrase(
|
||||||
signing_gpg_dir: str, signing_key_fp: str, passphrase: str
|
signing_gpg_dir: str,
|
||||||
|
signing_key_fp: str,
|
||||||
|
passphrase: str,
|
||||||
|
other_state: dict[str, any],
|
||||||
):
|
):
|
||||||
"""Checks if the given gpg passphrase works with the gpg signing key."""
|
"""Checks if the given gpg passphrase works with the gpg signing key."""
|
||||||
|
|
||||||
|
@ -1886,6 +1889,7 @@ def main():
|
||||||
other_state["signing_gpg_dir"],
|
other_state["signing_gpg_dir"],
|
||||||
other_state["signing_gpg_key_fp"],
|
other_state["signing_gpg_key_fp"],
|
||||||
other_state["signing_gpg_pass"],
|
other_state["signing_gpg_pass"],
|
||||||
|
other_state,
|
||||||
):
|
):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif args.config:
|
elif args.config:
|
||||||
|
@ -1987,6 +1991,7 @@ def main():
|
||||||
other_state["signing_gpg_dir"],
|
other_state["signing_gpg_dir"],
|
||||||
other_state["signing_gpg_key_fp"],
|
other_state["signing_gpg_key_fp"],
|
||||||
other_state["signing_gpg_pass"],
|
other_state["signing_gpg_pass"],
|
||||||
|
other_state,
|
||||||
):
|
):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if "editor" in d:
|
if "editor" in d:
|
||||||
|
|
Loading…
Reference in a new issue