Skip to content
Snippets Groups Projects
Commit 95d91c5c authored by matograine's avatar matograine
Browse files

[mod] #344 comment tui.convert_time and remove strange imports

parent 047a313b
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,7 @@ from pathlib import Path ...@@ -23,8 +23,7 @@ from pathlib import Path
from duniterpy.key import SigningKey from duniterpy.key import SigningKey
from duniterpy.key.scrypt_params import ScryptParams from duniterpy.key.scrypt_params import ScryptParams
# had to import display_pubkey_and_checksum from wot to avoid loop dependency. from silkaj.tui import display_pubkey_and_checksum
from silkaj.wot import display_pubkey_and_checksum
from silkaj.tools import message_exit from silkaj.tools import message_exit
from silkaj.constants import PUBKEY_PATTERN from silkaj.constants import PUBKEY_PATTERN
......
...@@ -23,7 +23,6 @@ from silkaj.blockchain_tools import HeadBlock ...@@ -23,7 +23,6 @@ from silkaj.blockchain_tools import HeadBlock
from silkaj.tools import CurrencySymbol, message_exit, coroutine from silkaj.tools import CurrencySymbol, message_exit, coroutine
from silkaj.auth import auth_method, has_auth_method from silkaj.auth import auth_method, has_auth_method
# had to import wot to prevent loop dependency. No use here.
from silkaj import wot from silkaj import wot
from silkaj.crypto_tools import ( from silkaj.crypto_tools import (
is_pubkey_and_check, is_pubkey_and_check,
......
...@@ -69,6 +69,7 @@ async def send_doc_confirmation(document_name): ...@@ -69,6 +69,7 @@ async def send_doc_confirmation(document_name):
sys.exit(constants.SUCCESS_EXIT_STATUS) sys.exit(constants.SUCCESS_EXIT_STATUS)
"""
def convert_time(timestamp, kind): def convert_time(timestamp, kind):
ts = int(timestamp) ts = int(timestamp)
date = "%Y-%m-%d" date = "%Y-%m-%d"
...@@ -83,3 +84,4 @@ def convert_time(timestamp, kind): ...@@ -83,3 +84,4 @@ def convert_time(timestamp, kind):
if ts >= 3600: if ts >= 3600:
pattern += second pattern += second
return datetime.fromtimestamp(ts).strftime(pattern) return datetime.fromtimestamp(ts).strftime(pattern)
"""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment