Skip to content

Commit aaf9d0d

Browse files
committed
Merge pull request #8 from splunk/feature/new-style-classes
new style classes
2 parents 486ce64 + 368c705 commit aaf9d0d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

splunk/binding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def prefix(**kwargs):
4242
port = kwargs.get("port", DEFAULT_PORT)
4343
return "%s://%s:%s" % (scheme, host, port)
4444

45-
class Context:
45+
class Context(object):
4646
# kwargs: scheme, host, port, username, password, namespace
4747
def __init__(self, handler=None, **kwargs):
4848
self.http = HttpLib(handler)
@@ -229,7 +229,7 @@ def request(self, url, headers=None, **kwargs):
229229
return response
230230

231231
# Converts an httplib response into a file-like object.
232-
class ResponseReader:
232+
class ResponseReader(object):
233233
def __init__(self, response):
234234
self._response = response
235235

splunk/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def users(self):
187187
service.post(PATH_USERS, name=name, **kwargs),
188188
dtor=lambda service, name: service.delete(PATH_USERS + name))
189189

190-
class Endpoint:
190+
class Endpoint(object):
191191
"""The base class for all client layer endpoints."""
192192
def __init__(self, service, path):
193193
self.service = service

splunk/results.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
]
2323

2424
# Splices a list of strings and file-like objects into a single stream
25-
class ListStream:
25+
class ListStream(object):
2626
def __init__(self, *args):
2727
count = len(args)
2828
if count == 0:
@@ -57,7 +57,7 @@ def _next(self):
5757
# A file-like interface that will convert a stream of XML fragments, into
5858
# a well-formed XML document by injecting a root element into the stream.
5959
# This is basically an annoying hack and I'd love a better idea.
60-
class XMLStream:
60+
class XMLStream(object):
6161
def __init__(self, file_):
6262
self.file = XMLStream.prepare(file_)
6363

@@ -104,7 +104,7 @@ def read(self, size):
104104
TAG = "TAG" # kind, name, attrs
105105
END = "END" # kind, name
106106
VAL = "VAL" # kind, value
107-
class XMLReader:
107+
class XMLReader(object):
108108
def __init__(self, stream):
109109
self._items = pulldom.parse(XMLStream(stream), bufsize = 256)
110110
self._item = None # The current item
@@ -225,7 +225,7 @@ def read(self):
225225
MESSAGE = "MESSAGE"
226226
RESULT = "RESULT"
227227
RESULTS = "RESULTS"
228-
class ResultsReader:
228+
class ResultsReader(object):
229229
"""A forward-only, streaming search results reader."""
230230
def __init__(self, stream):
231231
self._reader = XMLReader(stream)

0 commit comments

Comments
 (0)