Skip to content

Commit 401b7c6

Browse files
committed
Merge pull request prometheus#10 from mmoya/fixes
Random fixes
2 parents 38b6772 + 7c327ae commit 401b7c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

prometheus_client/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def register(self, collector):
4242
with self._lock:
4343
self._collectors.add(collector)
4444

45-
def unregister(self, metric):
45+
def unregister(self, collector):
4646
'''Remove a collector from the registry.'''
4747
with self._lock:
4848
self._collectors.remove(collector)
@@ -102,7 +102,7 @@ def __init__(self, wrappedClass, labelnames, **kwargs):
102102

103103
for l in labelnames:
104104
if l.startswith('__'):
105-
raise InvalidLabelName(l)
105+
raise ValueError('Invalid label metric name: ' + l)
106106

107107
def labels(self, *labelvalues):
108108
'''Return the child for the given labelset.'''

0 commit comments

Comments
 (0)