Skip to content

Commit

Permalink
enforce the tag name to be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
ojii committed Jan 18, 2013
1 parent 94ed3d5 commit c590e72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classytags/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ def __new__(cls, name, bases, attrs):
parents = [base for base in bases if isinstance(base, TagMeta)]
if not parents:
return super(TagMeta, cls).__new__(cls, name, bases, attrs)
tag_name = attrs.get('name', get_default_name(name))
tag_name = str(attrs.get('name', get_default_name(name)))

def fake_func():
pass # pragma: no cover

fake_func.__name__ = tag_name
attrs['_decorated_function'] = fake_func
attrs['name'] = tag_name
attrs['name'] = str(tag_name)
return super(TagMeta, cls).__new__(cls, name, bases, attrs)


Expand Down

0 comments on commit c590e72

Please sign in to comment.