saltstack/salt — Issue #352: We don't catch when a state does not have a watcher function
Author: thatch45
Created: 2011-12-13 00:32:14+00:00
State: open

If watch is declared on a state that does not have a watcher function it should just use require

Traceback (most recent call last):
File "/usr/bin/salt-call", line 18, in
main()
File "/usr/bin/salt-call", line 15, in main
client.run()
File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 582, in run
caller.run()
File "/usr/lib/python2.6/site-packages/salt/cli/caller.py", line 97, in run
ret = self.call()
File "/usr/lib/python2.6/site-packages/salt/cli/caller.py", line 37, in call
*self.opts['arg']
File "/usr/lib/python2.6/site-packages/salt/modules/state.py", line 75, in highstate
return st_.call_highstate()
File "/usr/lib/python2.6/site-packages/salt/state.py", line 938, in call_highstate
return self.state.call_high(high)
File "/usr/lib/python2.6/site-packages/salt/state.py", line 657, in call_high
return self.call_chunks(chunks)
File "/usr/lib/python2.6/site-packages/salt/state.py", line 493, in call_chunks
running = self.call_chunk(low, running, chunks)
File "/usr/lib/python2.6/site-packages/salt/state.py", line 621, in call_chunk
running = self.call_chunk(low, running, chunks)
File "/usr/lib/python2.6/site-packages/salt/state.py", line 631, in call_chunk
ret = self.call(low)
File "/usr/lib/python2.6/site-packages/salt/state.py", line 476, in call
cdata = self.format_call(data)
File "/usr/lib/python2.6/site-packages/salt/state.py", line 304, in format_call
aspec = inspect.getargspec(self.states[ret['full']])
KeyError: 'file.watcher