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

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
martriay committed Aug 4, 2022
1 parent 654e032 commit 5969257
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/nile/core/call_or_invoke.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Command to call or invoke StarkNet smart contracts."""
import contextlib
import logging
import os
import subprocess
Expand Down Expand Up @@ -48,9 +47,7 @@ def call_or_invoke(
command.append("--no_wallet")

try:
with contextlib.suppress(subprocess.CalledProcessError):
return subprocess.check_output(command).strip().decode("utf-8")
return ""
return subprocess.check_output(command).strip().decode("utf-8")
except subprocess.CalledProcessError:
p = subprocess.Popen(command, stderr=subprocess.PIPE)
_, error = p.communicate()
Expand All @@ -62,5 +59,6 @@ def call_or_invoke(
--max_fee=`MAX_FEE`
"""
)
return ""
else:
raise

0 comments on commit 5969257

Please sign in to comment.