fixed localcommand formatting and imports
parent
eea8b39b0f
commit
37913d544b
|
@ -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 urllib
|
||||||
import json
|
import time
|
||||||
import functools
|
import functools
|
||||||
from typing import TYPE_CHECKING, Callable
|
from typing import TYPE_CHECKING, Callable
|
||||||
|
|
||||||
|
@ -29,7 +28,10 @@ import filepaths
|
||||||
"""
|
"""
|
||||||
config.reload()
|
config.reload()
|
||||||
|
|
||||||
cache = deadsimplekv.DeadSimpleKV(filepaths.cached_storage, refresh_seconds=1000)
|
cache = deadsimplekv.DeadSimpleKV(filepaths.cached_storage,
|
||||||
|
refresh_seconds=1000)
|
||||||
|
|
||||||
|
|
||||||
def get_hostname():
|
def get_hostname():
|
||||||
hostname = ''
|
hostname = ''
|
||||||
waited = 0
|
waited = 0
|
||||||
|
@ -52,6 +54,7 @@ def get_hostname():
|
||||||
else:
|
else:
|
||||||
return hostname
|
return hostname
|
||||||
|
|
||||||
|
|
||||||
def local_command(command, data='', silent = True, post=False,
|
def local_command(command, data='', silent = True, post=False,
|
||||||
postData = {}, maxWait=20,
|
postData = {}, maxWait=20,
|
||||||
is_json=False
|
is_json=False
|
||||||
|
|
Loading…
Reference in New Issue