From e77e213589d9882e106005990f70bc8de304a4e0 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 19 Dec 2019 03:12:56 -0600 Subject: [PATCH] made keyadders pep8 compliant --- src/onionrcommands/keyadders.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/onionrcommands/keyadders.py b/src/onionrcommands/keyadders.py index 5c15103e..a76e275c 100755 --- a/src/onionrcommands/keyadders.py +++ b/src/onionrcommands/keyadders.py @@ -1,9 +1,12 @@ -''' +""" Onionr - Private P2P Communication add keys (transport and pubkey) -''' -''' +""" +import sys +import logger +from coredb import keydb +""" This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or @@ -16,22 +19,23 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . -''' -import sys -import logger -from coredb import keydb +""" + def add_address(): + """Command to add a peer address from either an arg or stdin""" try: newAddress = sys.argv[2] newAddress = newAddress.replace('http:', '').replace('/', '') except IndexError: pass else: - logger.info("Adding address: " + logger.colors.underline + newAddress, terminal=True) + logger.info("Adding address: " + logger.colors.underline + newAddress, + terminal=True) if keydb.addkeys.add_address(newAddress): logger.info("Successfully added address.", terminal=True) else: logger.warn("Unable to add address.", terminal=True) -add_address.onionr_help = "Adds a node transport address to the local node list" + +add_address.onionr_help = "Adds a node transport address to the node list"