Avoid panic's when referencing non-existing objects

No idea why wrapping the cmd in a function avoids a panic. Probably
something about the gc...
This commit is contained in:
James Shubin
2016-01-14 23:58:49 -05:00
parent f7858b8e9b
commit 6e9439f4e3
3 changed files with 29 additions and 6 deletions

15
examples/graph8d.yaml Normal file
View File

@@ -0,0 +1,15 @@
---
graph: mygraph
types:
exec:
- name: exec1
cmd: echo hello from exec1
shell: ''
timeout: 0
watchcmd: sleep 5s
watchshell: ''
ifcmd: ''
ifshell: ''
pollint: 0
state: present
edges: []