daemon: fix the update method of test element in config script to cope with nil
authorJanos Kovacs <jankovac503@gmail.com>
Wed, 14 Nov 2012 01:36:49 +0000 (03:36 +0200)
committerJanos Kovacs <jankovac503@gmail.com>
Wed, 14 Nov 2012 01:36:49 +0000 (03:36 +0200)
src/daemon/murphy.lua

index 4ebac53..4483642 100644 (file)
@@ -140,6 +140,11 @@ element.lua {
                           }
             },
    update  = function(self)
-               print("*** element "..self.name.." update "..self.inputs.owner.single_value)
+                if (self.inputs.owner.single_value) then
+                   print("*** element "..self.name.." update "..
+                          self.inputs.owner.single_value)
+                else
+                   print("*** element "..self.name.." update <nil>")
+                end
             end
 }