infusionsoft / Official-API-Python-Library

24 stars 30 forks source link

examples and library ported to python 3 #5

Open BMJHayward opened 9 years ago

andrewryno commented 9 years ago

Can you update this so it will try to import xmlrpc.client detect if it failed, and then import the 2.* package?

try:
    from xmlrpc.client import ServerProxy, Error
except ImportError:
    from xmlrpclib import ServerProxy, Error
BMJHayward commented 9 years ago

Sure, will be able to get to this tomorrow night.

On 22/02/15 07:30, Andrew Ryno wrote:

Can you update this so it will try to import xmlrpc.client detect if it failed, and then import the 2.* package?

try: from xmlrpc.client import ServerProxy, Error except ImportError: from xmlrpclib import ServerProxy, Error

— Reply to this email directly or view it on GitHub https://github.com/infusionsoft/Official-API-Python-Library/pull/5#issuecomment-75391245.

BMJHayward commented 9 years ago

This version uses the try: except as advised. The other pull request uses if: else instead.