From 0fa7a25f1715a9b05d96bcfd78fcc92022332f2d Mon Sep 17 00:00:00 2001 From: evilhero Date: Wed, 2 Apr 2014 15:14:30 -0400 Subject: [PATCH] FIX: configuration wouldn't save (typo), FIX: Changed some error messages when doing Test SABnzbd and auto-grabbing API --- mylar/__init__.py | 2 +- mylar/webserve.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mylar/__init__.py b/mylar/__init__.py index 4bd49470..0dd36765 100755 --- a/mylar/__init__.py +++ b/mylar/__init__.py @@ -865,7 +865,7 @@ def launch_browser(host, port, root): except Exception, e: logger.error('Could not launch browser: %s' % e) -def config_write: +def config_write(): new_config = ConfigObj() new_config.filename = CONFIG_FILE diff --git a/mylar/webserve.py b/mylar/webserve.py index 51724f7d..647d8db5 100755 --- a/mylar/webserve.py +++ b/mylar/webserve.py @@ -2819,7 +2819,7 @@ class WebInterface(object): qd = True else: qerror = dom.getElementsByTagName('error')[0].firstChild.wholeText - logger.fdebug(str(qerror) + ' - check that the API (NZBkey) is correct, use the auto-detect option AND/OR check host:port settings') + logger.error(str(qerror) + ' - check that the API (NZBkey) is correct, use the auto-detect option AND/OR check host:port settings') qd = False if qd == False: return @@ -2827,19 +2827,19 @@ class WebInterface(object): #test which apikey provided if q_nzbkey != sab_apikey: if q_apikey != sab_apikey: - logger.fdebug('APIKey provided does not match with SABnzbd') + logger.error('APIKey provided does not match with SABnzbd') return else: - logger.fdebug('APIKey provided is FULL APIKey which is too much power - changing to NZBKey') + logger.info('APIKey provided is FULL APIKey which is too much power - changing to NZBKey') mylar.SAB_APIKEY = q_nzbkey mylar.config_write() - logger.fdebug('Succcessfully changed to NZBKey. Thanks for shopping S-MART!') + logger.info('Succcessfully changed to NZBKey. Thanks for shopping S-MART!') else: - logger.fdebug('APIKey provided is NZBKey which is the correct key.') + logger.info('APIKey provided is NZBKey which is the correct key.') - logger.fdebug('Connection to SABnzbd tested sucessfully') + logger.info('Connection to SABnzbd tested sucessfully') else: - logger.fdebug('You do not have anything stated for SAB Host. Please correct and try again.') + logger.error('You do not have anything stated for SAB Host. Please correct and try again.') return SABtest.exposed = True