From 37913d544bc7294351a1ce65a43f86cef8865331 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 3 Apr 2020 04:19:20 -0500 Subject: [PATCH] fixed localcommand formatting and imports --- src/onionrutils/localcommand.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/onionrutils/localcommand.py b/src/onionrutils/localcommand.py index 7a3bde84..b1330cf8 100644 --- a/src/onionrutils/localcommand.py +++ b/src/onionrutils/localcommand.py @@ -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