Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Reduce subprocess verbosity on call, or invoke, error #126

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/nile/core/call_or_invoke.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Command to call or invoke StarkNet smart contracts."""
import contextlib
import os
import subprocess

Expand Down Expand Up @@ -37,4 +38,6 @@ def call_or_invoke(contract, type, method, params, network, signature=None):
command.append("--signature")
command.extend(signature)

return subprocess.check_output(command).strip().decode("utf-8")
with contextlib.suppress(subprocess.CalledProcessError):
return subprocess.check_output(command).strip().decode("utf-8")
return ""