-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fnmatch traceback #6521
Comments
Found the problem, had an entry that looked like the above, note the incomplete "file" requisite. While it's true that this is a user error, having a proper error message would be useful. |
Yes, this should be an easy thing to catch :) |
I've already tracked it down. |
W00t! |
I'm about to submit a pull for this. I was able to suppress this traceback by simply skipping the requisite chunks with a value of Old:
New:
|
+1 from me. I think that looks much better. |
This fixes saltstack#6521 by skipping any requisites that have a value of None. Additionally, the state output for failed requisites has been cleaned up a bit. See the following link for an example: saltstack#6521 (comment)
Thanks everyone for the quick turnaround! |
No prob! Don't hesitate to let us know if you encounter any other problems. |
This fixes #6521 by skipping any requisites that have a value of None. Additionally, the state output for failed requisites has been cleaned up a bit. See the following link for an example: #6521 (comment) Conflicts: salt/state.py
Getting the following traceback on 0.16.0 and 0.16.2. Not really sure where to begin to debug this.
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in
salt_call()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 76, in salt_call
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/init.py", line 265, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 129, in run
ret = self.call()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 70, in call
ret['return'] = func(args, *kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 283, in sls
ret = st.state.call_high(high)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1508, in call_high
ret = self.call_chunks(chunks)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1275, in call_chunks
running = self.call_chunk(low, running, chunks)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1445, in call_chunk
running = self.call_chunk(chunk, running, chunks)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1385, in call_chunk
status = self.check_requisite(low, running, chunks, True)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1325, in check_requisite
if (fnmatch.fnmatch(chunk['name'], req_val) or
File "/usr/lib64/python2.7/fnmatch.py", line 43, in fnmatch
return fnmatchcase(name, pat)
File "/usr/lib64/python2.7/fnmatch.py", line 75, in fnmatchcase
res = translate(pat)
File "/usr/lib64/python2.7/fnmatch.py", line 87, in translate
i, n = 0, len(pat)
TypeError: object of type 'NoneType' has no len()
The text was updated successfully, but these errors were encountered: