Qpid
  1. Qpid
  2. QPID-4882

Syntax (NameError) thrown by python client when using older versions of python (<2.6)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.20
    • Fix Version/s: 0.23
    • Component/s: Python Client
    • Labels:
      None

      Description

      Bug discovered by Petr Matousek.

      Attempting to validate the broker using the 'ssl_trustfile' parameter results in the following crash:

      1. ~/qc2_drain.py -b amqps://$(hostname):5671 "amq.direct/test" --connection-options " {ssl_certfile:/var/lib/qpidd/qpid_nss_db/client.pem, ssl_trustfile:/var/lib/qpidd/qpid_nss_db/rootca.crt}

        "
        Traceback (most recent call last):
        File "/root/qc2_drain.py", line 171, in ?
        conn.open()
        File "<string>", line 6, in open
        File "/usr/lib/python2.4/site-packages/qpid/messaging/endpoints.py", line 261, in open
        self.attach()
        File "<string>", line 6, in attach
        File "/usr/lib/python2.4/site-packages/qpid/messaging/endpoints.py", line 279, in attach
        self._ewait(lambda: self._transport_connected and not self._unlinked())
        File "/usr/lib/python2.4/site-packages/qpid/messaging/endpoints.py", line 214, in _ewait
        self.check_error()
        File "/usr/lib/python2.4/site-packages/qpid/messaging/endpoints.py", line 207, in check_error
        raise self.error
        qpid.messaging.exceptions.InternalError: Traceback (most recent call last):
        File "/usr/lib/python2.4/site-packages/qpid/messaging/driver.py", line 509, in dispatch
        self.connect()
        File "/usr/lib/python2.4/site-packages/qpid/messaging/driver.py", line 533, in connect
        self._transport = trans(self.connection, host, port)
        File "/usr/lib/python2.4/site-packages/qpid/messaging/transports.py", line 79, in _init_
        raise SSLError("This version of Python does not support verification of the peer's certificate.")
        NameError: global name 'SSLError' is not defined

      This is due to the fact that older python releases do not define the SSLError exception.

        Activity

        Ken Giusti created issue -
        Ken Giusti made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Justin Ross made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Ken Giusti
            Reporter:
            Ken Giusti
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development