Skip to content

Commit

Permalink
Don't be so greedy while looking for knife errors
Browse files Browse the repository at this point in the history
Fixes false positive when there is a "Invalid gemspec" error
  • Loading branch information
tobami committed Oct 17, 2011
1 parent 3a1d918 commit 245f8f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions littlechef/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ def _generate_metadata(path, cookbook_path, name):
['knife', 'cookbook', 'metadata', '-o', cookbook_path, name],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
resp, error = proc.communicate()
if (error or 'FATAL:' in resp or
'Generating metadata for' not in resp):
if ('FATAL:' in resp or 'Generating metadata for' not in resp):
msg = "Unkown error while generating metadata.json for "
msg += "{0}. Cookbook attributes may be out of date".format(
path)
Expand Down

0 comments on commit 245f8f5

Please sign in to comment.