Fail gracefully if there is no resource to ignore

* Check if the self.options.ignore array is non-empty.
* Match again the resource['id'].
* Fix a small pep8 violation.