From ccea91e260322f5c31035132afd9150689dc7fa5 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 4 May 2018 12:44:35 -0500 Subject: [PATCH] fixed merge issues --- onionr/communicator.py | 2 +- onionr/onionr.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index c46d7d80..0e0a1c77 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -196,7 +196,7 @@ class OnionrCommunicate: return self.connection_handlers elif name in self.connection_handlers: return self.connection_handlers[name] - else + else: return list() def add_connection_handler(self, name, handler): diff --git a/onionr/onionr.py b/onionr/onionr.py index 213d5d6e..285c74bf 100755 --- a/onionr/onionr.py +++ b/onionr/onionr.py @@ -25,7 +25,7 @@ import sys if sys.version_info[0] == 2 or sys.version_info[1] < 5: print('Error, Onionr requires Python 3.4+') sys.exit(1) -import os, base64, random, getpass, shutil, subprocess, requests, time, platform, datetime, re +import os, base64, random, getpass, shutil, subprocess, requests, time, platform, datetime, re, json from threading import Thread import api, core, config, logger, onionrplugins as plugins, onionrevents as events from onionrutils import OnionrUtils @@ -64,7 +64,7 @@ class Onionr: else: # the default config file doesn't exist, try hardcoded config config.set_config({'devmode': True, 'log': {'file': {'output': True, 'path': 'data/output.log'}, 'console': {'output': True, 'color': True}}}) - if not exists: + if not data_exists: config.save() config.reload() # this will read the configuration file into memory @@ -134,7 +134,7 @@ class Onionr: # Get configuration - if not exists: + if not data_exists: # Generate default config # Hostname should only be set if different from 127.x.x.x. Important for DNS rebinding attack prevention. if self.debug: