From a5dbf73df44a8f8344892af6d0dfb3b929a189bf Mon Sep 17 00:00:00 2001 From: Arinerron Date: Sun, 22 Apr 2018 20:45:25 -0700 Subject: [PATCH] Simple fix for GUI plugin --- onionr/default-plugins/gui/main.py | 1 + onionr/onionr.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/onionr/default-plugins/gui/main.py b/onionr/default-plugins/gui/main.py index dcd87f89..6cf78289 100644 --- a/onionr/default-plugins/gui/main.py +++ b/onionr/default-plugins/gui/main.py @@ -73,6 +73,7 @@ def openGUI(): nodeInfo = Frame(root) keyInfo = Frame(root) + print(pluginapi.get_onionr().get_hostname()) idText = pluginapi.get_onionr().get_hostname() idEntry = Entry(nodeInfo) diff --git a/onionr/onionr.py b/onionr/onionr.py index bd3fd952..b04a9d4a 100755 --- a/onionr/onionr.py +++ b/onionr/onionr.py @@ -561,8 +561,9 @@ class Onionr: with open('./data/hs/hostname', 'r') as hostname: retVal = hostname.read() except FileNotFoundError: - return retVal - + retVal = None + return retVal + def addFile(self): '''command to add a file to the onionr network''' if len(sys.argv) >= 2: @@ -576,6 +577,6 @@ class Onionr: else: print(new) self.onionrCore.insertBlock(new, header='bin') - + Onionr()