Skip to content

Commit 383e27b

Browse files
authored
Merge pull request #3158 from IntersectMBO/better_xor
improve: logic for paired argument validation
2 parents 4d59394 + fb5c223 commit 383e27b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cardano_node_tests/testnet_cleanup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def main() -> int:
5353
if not socket_env:
5454
LOGGER.error("The `CARDANO_NODE_SOCKET_PATH` environment variable is not set.")
5555
return 1
56-
if bool(args.address) ^ bool(args.skey_file):
56+
if bool(args.address) != bool(args.skey_file):
5757
LOGGER.error(
5858
"Both address and skey file must be provided, or neither of them should be provided."
5959
)

cardano_node_tests/tests/test_scripts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def multisig_tx(
5555
build_method: str = clusterlib_utils.BuildMethods.BUILD_RAW,
5656
) -> clusterlib.TxRawOutput:
5757
"""Build and submit multisig transaction."""
58-
if bool(multisig_script) ^ bool(script_utxos):
58+
if bool(multisig_script) != bool(script_utxos):
5959
err = "Both `multisig_script` and `script_utxos` must be provided"
6060
raise ValueError(err)
6161

0 commit comments

Comments
 (0)