Skip to content

Commit ac4015a

Browse files
author
Frederick Ross
committed
Refactor inserting a private class between Context and Service in the hierarchy.
This is to be able to easily insert a StormService descended from _BaseService when we start adding Storm support.
1 parent ba21078 commit ac4015a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

splunklib/client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ def connect(**kwargs):
285285
"""
286286
return Service(**kwargs).login()
287287

288-
class Service(Context):
288+
class _BaseService(Context):
289+
pass
290+
291+
class Service(_BaseService):
289292
"""A Pythonic binding to Splunk instances.
290293
291294
A :class:`Service` represents a binding to a Splunk instane on an
@@ -334,7 +337,7 @@ class Service(Context):
334337
s = client.Service(token="atg232342aa34324a")
335338
"""
336339
def __init__(self, **kwargs):
337-
Context.__init__(self, **kwargs)
340+
super(Service, self).__init__(self, **kwargs)
338341
self._splunk_version = None
339342

340343
@property

0 commit comments

Comments
 (0)