From 6b4d7674b5292a25895cc20b702f5ddd3977b47e Mon Sep 17 00:00:00 2001 From: Andriy Zasypkin Date: Tue, 16 Jan 2018 09:30:26 -0500 Subject: [PATCH] use isinstance instead of type --- cps/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index 8d00ad53..27f5ce65 100755 --- a/cps/web.py +++ b/cps/web.py @@ -477,7 +477,7 @@ def yesno(value, yes, no): @app.template_filter('canread') @app.template_test('canread') def canread(ext): - if type(ext) == db.Data: + if isinstance(ext, db.Data): ext = ext.format return ext.lower() in READER_EXTENSIONS