Skip to content

Commit bcece26

Browse files
author
atran
committed
use self.tags rather than self.tag
1 parent 25045f9 commit bcece26

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

rollbar/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,23 +1692,23 @@ class _TagManager(object):
16921692
"""
16931693
Context manager object that interfaces with the `_tags` stack:
16941694
1695-
On enter, puts the tag object at top of the stack.
1695+
On enter, puts the tags at top of the stack.
16961696
On exit, pops off the top element of the stack.
1697-
- If there is an exception, attach the tag object to the exception
1697+
- If there is an exception, attach the tags to the exception
16981698
for rebuilding of the `_tags` stack before reporting.
16991699
"""
1700-
def __init__(self, tag):
1701-
self.tag = tag
1700+
def __init__(self, tags):
1701+
self.tags = tags
17021702

17031703
def __enter__(self):
1704-
_tags.append(self.tag)
1704+
_tags.append(self.tags)
17051705

17061706
def __exit__(self, exc_type, exc_value, traceback):
17071707

17081708
if exc_value:
17091709
if not hasattr(exc_value, '_rollbar_tags'):
17101710
exc_value._rollbar_tags = []
17111711

1712-
exc_value._rollbar_tags.append(self.tag)
1712+
exc_value._rollbar_tags.append(self.tags)
17131713

17141714
_tags.pop()

rollbar/test/test_feature_flag_context_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def setUp(self):
2323
def test_feature_flag_generates_correct_tag_payload(self):
2424
cm = rollbar.feature_flag('feature-foo', variation=True, user='[email protected]')
2525

26-
tags = cm.tag
26+
tags = cm.tags
2727
self.assertEqual(len(tags), 3)
2828

2929
key, variation, user = tags

0 commit comments

Comments
 (0)