From 76af1e1effe14783d3a80a3b6658fcf66fc3926e Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Thu, 27 Nov 2014 11:24:17 -0600 Subject: [PATCH] Fix Py3 NoneType fail --- loopy/context_matching.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loopy/context_matching.py b/loopy/context_matching.py index eb85c1dd0..b259a0ddd 100644 --- a/loopy/context_matching.py +++ b/loopy/context_matching.py @@ -27,7 +27,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import types +NoneType = type(None) # {{{ id match objects @@ -43,7 +43,7 @@ class RegexIdentifierMatch(object): self.tag_re = tag_re def __call__(self, identifier, tags): - assert isinstance(tags, (tuple, types.NoneType)) + assert isinstance(tags, (tuple, NoneType)) if self.tag_re is None: return self.id_re.match(identifier) is not None -- GitLab