Skip to content

Commit

Permalink
- Fixes bug in setting of debug level for new installs.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveL17 committed Jul 17, 2018
1 parent aaa07b6 commit 6f360ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GhostXML.indigoPlugin/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>0.4.07</string>
<string>0.4.08</string>
<key>ServerApiVersion</key>
<string>2.0</string>
<key>IwsApiVersion</key>
Expand Down
9 changes: 5 additions & 4 deletions GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
Expand All @@ -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

Expand Down
3 changes: 3 additions & 0 deletions _changelog.txt
Original file line number Diff line number Diff line change
@@ -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'.
Expand Down

0 comments on commit 6f360ac

Please sign in to comment.