fixed localcommand formatting and imports

This commit is contained in:
Kevin Froman 2020-04-03 04:19:20 -05:00
parent eea8b39b0f
commit 37913d544b
1 changed files with 9 additions and 6 deletions

View File

@ -1,10 +1,9 @@
"""
Onionr - Private P2P Communication
"""Onionr - Private P2P Communication.
send a command to the local API server
send a command to the local API server
"""
import urllib, time
import json
import urllib
import time
import functools
from typing import TYPE_CHECKING, Callable
@ -29,7 +28,10 @@ import filepaths
"""
config.reload()
cache = deadsimplekv.DeadSimpleKV(filepaths.cached_storage, refresh_seconds=1000)
cache = deadsimplekv.DeadSimpleKV(filepaths.cached_storage,
refresh_seconds=1000)
def get_hostname():
hostname = ''
waited = 0
@ -52,6 +54,7 @@ def get_hostname():
else:
return hostname
def local_command(command, data='', silent = True, post=False,
postData = {}, maxWait=20,
is_json=False