Skip to content

Commit

Permalink
Adds proc.returncode to curl error warning to start to be more explicit
Browse files Browse the repository at this point in the history
about trapping unsuccessful results.
  • Loading branch information
DaveL17 committed May 29, 2019
1 parent f7ac48b commit a0b8ece
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 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.30</string>
<string>0.4.31</string>
<key>ServerApiVersion</key>
<string>2.0</string>
<key>IwsApiVersion</key>
Expand Down
7 changes: 5 additions & 2 deletions GhostXML.indigoPlugin/Contents/Server Plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
__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.30"
__version__ = u"0.4.31"

# Establish default plugin prefs; create them if they don't already exist.
kDefaultPluginPrefs = {
Expand Down Expand Up @@ -749,8 +749,11 @@ def get_the_data(self, dev):
timer_kill.cancel()
# =============================================================================

# TODO: Get more specific on what the proc.returncode is. For example, this error:
# 2019-05-28 22:59:02.650 GhostXML Warning [607047935] curl error * Trying 162.58.33.179... * TCP_NODELAY set .
# doesn't give the user much information on why the call was unsuccessful.
if int(proc.returncode) != 0:
self.host_plugin.logger.warning(u"[{0}] curl error {1}.".format(dev.name, err.replace('\n', ' ')))
self.host_plugin.logger.warning(u"[{0}] curl error {1}. [Return code: {2}".format(dev.name, err.replace('\n', ' '), proc.returncode))

return result

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.31
-

v0.4.30
- Adds sendDevicePing() trap.

Expand Down
11 changes: 11 additions & 0 deletions feature_requests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
===============================================================================
GhostXML Plugin Feature Requests
===============================================================================

===============================================================================
2019-05-24 Multiple Users
===============================================================================
Present custom states as their "inherent" type.

DaveL17 - Consider howartp's suggestion to present this as a second device
type (i.e., original string states and another literal states).

0 comments on commit a0b8ece

Please sign in to comment.