Browse Source

Clean up imports

patch-2
Neil Booth 6 years ago
parent
commit
93e012c6a5
  1. 5
      electrumx/server/daemon.py

5
electrumx/server/daemon.py

@ -14,15 +14,14 @@ import json
import time import time
from calendar import timegm from calendar import timegm
from struct import pack from struct import pack
from time import strptime
import aiohttp import aiohttp
from aiorpcx import JSONRPC
from electrumx.lib.util import hex_to_bytes, class_logger,\ from electrumx.lib.util import hex_to_bytes, class_logger,\
unpack_le_uint16_from, pack_varint unpack_le_uint16_from, pack_varint
from electrumx.lib.hash import hex_str_to_hash, hash_to_hex_str from electrumx.lib.hash import hex_str_to_hash, hash_to_hex_str
from electrumx.lib.tx import DeserializerDecred from electrumx.lib.tx import DeserializerDecred
from aiorpcx import JSONRPC
class DaemonError(Exception): class DaemonError(Exception):
@ -368,7 +367,7 @@ class LegacyRPCDaemon(Daemon):
def timestamp_safe(self, t): def timestamp_safe(self, t):
if isinstance(t, int): if isinstance(t, int):
return t return t
return timegm(strptime(t, "%Y-%m-%d %H:%M:%S %Z")) return timegm(time.strptime(t, "%Y-%m-%d %H:%M:%S %Z"))
class DecredDaemon(Daemon): class DecredDaemon(Daemon):

Loading…
Cancel
Save