some minor fixes

pull/135/head
Michael Zanetti 2014-12-21 17:22:11 +01:00 committed by Michael Zanetti
parent 240c5e36d6
commit b0202e928a
2 changed files with 10 additions and 4 deletions

View File

@ -326,7 +326,8 @@
"ruleId": "Uuid"
},
"returns": {
"rule": "$ref:Rule"
"o:rule": "$ref:Rule",
"ruleError": "$ref:RuleError"
}
},
"Rules.GetRules": {

View File

@ -809,6 +809,7 @@ def list_logEntries():
value = "inactive"
if entry['source'] == "LoggingSourceStates":
print "have state change"
typeId = entry['typeId']
sourceType = "State Changed"
symbolString = "->"
@ -828,9 +829,10 @@ def list_logEntries():
device = get_device(entry['deviceId'])
if device is not None:
deviceName = device['name']
deviceIdCache[entry['deviceId']] = deviceName
else:
deviceName = typeId
deviceName = entry['deviceId']
deviceIdCache[entry['deviceId']] = deviceName
print "added entryp to devicechace 1", deviceName, entry['deviceId']
if entry['source'] == "LoggingSourceActions":
@ -856,6 +858,7 @@ def list_logEntries():
else:
deviceName = entry['deviceId']
deviceIdCache[entry['deviceId']] = deviceName
print "added entryp to devicechace 2", deviceName
if entry['source'] == "LoggingSourceEvents":
typeId = entry['typeId']
@ -869,14 +872,16 @@ def list_logEntries():
eventTypeIdCache[typeId] = sourceName
value = entry['value']
if entry['deviceId'] in deviceIdCache:
print "entry is in devicecache"
deviceName = deviceIdCache[entry['deviceId']]
else:
device = get_device(entry['deviceId'])
if device is not None:
deviceName = device['name']
else:
devieName = entry['deviceId']
deviceName = entry['deviceId']
deviceIdCache[entry['deviceId']] = deviceName
print "added entryp to devicechace 3", deviceName
if entry['source'] == "LoggingSourceRules":