Skip to content

Commit 5fe3241

Browse files
committed
Fix some issues causing problems on Python 2.6
1 parent 288d401 commit 5fe3241

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_tables2/columns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def __init__(self, viewname, urlconf=None, args=None, kwargs=None,
283283
warnings.warn('attrs must be Attrs object, not %s'
284284
% type(attrs).__name__, DeprecationWarning)
285285
attrs = Attrs(a=attrs)
286-
extra['attrs'] = attrs
286+
extra[b'attrs'] = attrs
287287
super(LinkColumn, self).__init__(**extra)
288288
self.viewname = viewname
289289
self.urlconf = urlconf
@@ -298,7 +298,7 @@ def render(self, value, record, bound_column):
298298
# and use that to decide whether to render a link or just the default
299299
try:
300300
raw = bound_column.accessor.resolve(record)
301-
except (TypeError, AttributeError, KeyError, ValueError) as e:
301+
except (TypeError, AttributeError, KeyError, ValueError):
302302
raw = None
303303
if raw is None:
304304
return self.default

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy