def _iso_to_datetime(self, isodate):
        date_formats = ('%Y-%m-%dT%H:%M:%SZ', '%Y-%m-%dT%H:%M:%S%z')
        date = None

        for date_format in date_formats:
            try:
                date = datetime.strptime(isodate, date_format)
            except __HOLE__:
                pass

            if date:
                break

        return date
dataset/ETHPy150Open apache/libcloud/libcloud/loadbalancer/drivers/rackspace.py/RackspaceLBDriver._iso_to_datetime