Use isinstance() insted of type()
- compare to basestring instead of str, this matches unicode too
- fix indentation
diff --git a/reclass/core.py b/reclass/core.py
index b07c5b2..488ee49 100644
--- a/reclass/core.py
+++ b/reclass/core.py
@@ -25,10 +25,10 @@
self._ignore_class_notfound = ignore_class_notfound
self._input_data = input_data
- if type(ignore_class_regexp) == type(''):
- self._ignore_class_regexp = [ignore_class_regexp]
+ if isinstance(ignore_class_regexp, basestring):
+ self._ignore_class_regexp = [ignore_class_regexp]
else:
- self._ignore_class_regexp = ignore_class_regexp
+ self._ignore_class_regexp = ignore_class_regexp
@staticmethod
def _get_timestamp():