Skip to content

Commit

Permalink
add optional verbose parameter to Client.__init__
Browse files Browse the repository at this point in the history
useful addition for debugging
  • Loading branch information
Joe VanAndel committed Feb 7, 2015
1 parent 4d79957 commit c963273
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wordpress_xmlrpc/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ class Client(object):
`XmlrpcMethod`-derived class to `Client`'s `call` method.
"""

def __init__(self, url, username, password, blog_id=0, transport=None):
def __init__(self, url, username, password, blog_id=0, transport=None, verbose=False):
self.url = url
self.username = username
self.password = password
self.blog_id = blog_id

try:
self.server = xmlrpc_client.ServerProxy(url, allow_none=True, transport=transport)
self.server = xmlrpc_client.ServerProxy(url, allow_none=True, transport=transport,
verbose=verbose)
self.supported_methods = self.server.mt.supportedMethods()
except xmlrpc_client.ProtocolError:
e = sys.exc_info()[1]
Expand Down

0 comments on commit c963273

Please sign in to comment.