From 6f360ac0b0820db298237d2b97872b99ed46a4a4 Mon Sep 17 00:00:00 2001 From: DaveL17 Date: Tue, 17 Jul 2018 17:02:09 -0500 Subject: [PATCH] - Fixes bug in setting of debug level for new installs. --- GhostXML.indigoPlugin/Contents/Info.plist | 2 +- GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py | 9 +++++---- _changelog.txt | 3 +++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/GhostXML.indigoPlugin/Contents/Info.plist b/GhostXML.indigoPlugin/Contents/Info.plist index 93eb4ab..e61e081 100755 --- a/GhostXML.indigoPlugin/Contents/Info.plist +++ b/GhostXML.indigoPlugin/Contents/Info.plist @@ -3,7 +3,7 @@ PluginVersion - 0.4.07 + 0.4.08 ServerApiVersion 2.0 IwsApiVersion diff --git a/GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py b/GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py index cb4cec6..5be94e5 100644 --- a/GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py +++ b/GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py @@ -41,13 +41,13 @@ __copyright__ = u"There is no copyright for the GhostXML code base." __license__ = u"MIT" __title__ = u"GhostXML Plugin for Indigo Home Control" -__version__ = u"0.4.07" +__version__ = u"0.4.08" # Establish default plugin prefs; create them if they don't already exist. kDefaultPluginPrefs = { u'configMenuServerTimeout': "15", # Server timeout limit. u'showDebugInfo': False, # Verbose debug logging? - u'showDebugLevel': "1", # Low, Medium or High debug output. + u'showDebugLevel': "10", # Low, Medium or High debug output. u'updaterEmail': "", # Email to notify of plugin updates. u'updaterEmailsEnabled': False # Notification of plugin updates wanted. } @@ -61,9 +61,10 @@ def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs): self.pluginIsShuttingDown = False # ============================ Configure Logging ============================== + current_debug_level = int(self.pluginPrefs['showDebugLevel']) try: - if int(self.pluginPrefs.get('showDebugLevel', '30')) < 10: - self.pluginPrefs['showDebugLevel'] *= 10 + if current_debug_level < 10: + self.pluginPrefs['showDebugLevel'] = current_debug_level * 10 except ValueError: self.pluginPrefs['showDebugLevel'] = 30 diff --git a/_changelog.txt b/_changelog.txt index c3b6581..0b28cb1 100644 --- a/_changelog.txt +++ b/_changelog.txt @@ -1,5 +1,8 @@ ghostXML Change Log +v0.4.08 +- Fixes bug in setting of debug level for new installs. + v0.4.07 - Completes refactoring of plugin methods. Indigo methods remain camelCase, plugin methods become 'refresh_data_for_dev_action'.