diff --git a/silkaj/tx_history.py b/silkaj/tx_history.py index c7de2ce44a1d96a931e9548c45692980d1199568..466798cfdafe1fe33a8ecc569a9cfe5eda5ad3dd 100644 --- a/silkaj/tx_history.py +++ b/silkaj/tx_history.py @@ -15,9 +15,10 @@ You should have received a copy of the GNU Affero General Public License along with Silkaj. If not, see <https://www.gnu.org/licenses/>. """ +import shutil from operator import eq, itemgetter, ne, neg -from click import argument, command, echo_via_pager, get_terminal_size, option +from click import argument, command, echo_via_pager, option from duniterpy.api.bma.tx import history from duniterpy.documents.transaction import Transaction from pendulum import from_timestamp, now @@ -53,7 +54,7 @@ async def transaction_history(pubkey, uids, full_pubkey): txs_list = await generate_table( received_txs, sent_txs, pubkey, ud_value, currency_symbol, uids, full_pubkey ) - table = Texttable(max_width=get_terminal_size()[0]) + table = Texttable(max_width=shutil.get_terminal_size().columns) table.add_rows(txs_list) await client.close() echo_via_pager(header + table.draw())