Skip to content
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
Prev Previous commit
Next Next commit
Fix error
  • Loading branch information
rozhkovdmitrii committed Feb 3, 2022
commit a47ceb8797b694e3e70dde76acf483711206ad7f
9 changes: 4 additions & 5 deletions proxy/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@

class CliBase:

def run_cli(self, cmd: List[str]) -> str:
def run_cli(self, cmd: List[str], **kwargs) -> bytes:
self.debug("Calling: " + " ".join(cmd))
proc_result = subprocess.run(cmd, timeout=neon_cli_timeout, universal_newlines=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
proc_result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
if proc_result.stderr is not None:
print(proc_result.stderr, file=sys.stderr)
return proc_result.stdout
Expand All @@ -66,7 +65,7 @@ def call(self, *args):
"--url", SOLANA_URL,
] + list(args)
self.debug("Calling: " + " ".join(cmd))
return self.run_cli(cmd)
return self.run_cli(cmd, universal_newlines=True)
except subprocess.CalledProcessError as err:
self.error("ERR: solana error {}".format(err))
raise
Expand Down Expand Up @@ -127,7 +126,7 @@ def call(self, *args):
]\
+ (["-vvv"] if LOG_NEON_CLI_DEBUG else [])\
+ list(args)
return self.run_cli(cmd)
return self.run_cli(cmd, timeout=neon_cli_timeout, universal_newlines=True)
except subprocess.CalledProcessError as err:
self.error("ERR: neon-cli error {}".format(err))
raise
Expand Down