[cli] Increase default subprocess timeout to 60 sec

pull/2/head
Daniel Van Der Maden 5 years ago
parent 378b33790d
commit 01a391af77
  1. 9
      pyhmy/cli.py

@ -1,6 +1,5 @@
import subprocess import subprocess
import pexpect import pexpect
import json
import os import os
import shutil import shutil
import re import re
@ -124,14 +123,14 @@ class HmyCLI:
f"\tException: {err}") from err f"\tException: {err}") from err
del self._addresses[name] del self._addresses[name]
def remove_address(self, address) -> None: def remove_address(self, address):
""" """
:param address: The 'one1...' address to be removed. :param address: The 'one1...' address to be removed.
""" """
for name in self.get_names(address): for name in self.get_accounts(address):
self.remove_account(name) self.remove_account(name)
def single_call(self, command, timeout=30) -> str: def single_call(self, command, timeout=60):
""" """
:param command: String fo command to execute on CLI :param command: String fo command to execute on CLI
:param timeout: Optional timeout in seconds :param timeout: Optional timeout in seconds
@ -149,7 +148,7 @@ class HmyCLI:
f"\tException: {err}") from err f"\tException: {err}") from err
return response return response
def expect_call(self, command, timeout=30) -> pexpect.pty_spawn.spawn: def expect_call(self, command, timeout=60):
""" """
:param command: String fo command to execute on CLI :param command: String fo command to execute on CLI
:param timeout: Optional timeout in seconds :param timeout: Optional timeout in seconds

Loading…
Cancel
Save