Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6473

Remove remaining Python <= 2.5 raise syntax (i.e. raise "...") from connection08.py

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: qpid-python-1.35.0
    • Component/s: Python Client
    • Labels:
      None

      Description

      A number of Python <=2.5 raise "..." statements remain on the 08..09 paths within the Python client (connection08.py). This syntax became illegal in Python 2.6. This causes an exception like this:

      pid_tests.broker_0_9.echo.EchoTests. \
          test_commit_ok_possibly_interleaved_with_message_delivery ........... fail
      Error during test:  Traceback (most recent call last):
          File "./qpid-python-test", line 340, in run
            phase()
          File "/Users/keith/py/lib/python2.7/site-packages/qpid_tests/broker_0_9/echo.py", line 143, in test_commit_ok_possibly_interleaved_with_message_delivery
            channel.tx_commit()
          File "/Users/keith/src/qpid/qpid/python/qpid/peer.py", line 362, in <lambda>
            method = lambda *args, **kwargs: self.invoke(type, args, kwargs)
          File "/Users/keith/src/qpid/qpid/python/qpid/peer.py", line 280, in invoke
            return self.invoker(frame, content)
          File "/Users/keith/src/qpid/qpid/python/qpid/peer.py", line 355, in invoke_method
            raise Closed(self.reason)
        Closed: Fatal error:
        Traceback (most recent call last):
          File "/Users/keith/src/qpid/qpid/python/qpid/peer.py", line 93, in reader
            frame = self.conn.read()
          File "/Users/keith/src/qpid/qpid/python/qpid/connection08.py", line 181, in read_0_9
            return self.read_8_0()
          File "/Users/keith/src/qpid/qpid/python/qpid/connection08.py", line 169, in read_8_0
            raise "frame error: expected %r, got %r" % (self.FRAME_END, garbage)
        TypeError: exceptions must be old-style classes or derived from BaseException, not str
      

      It appears in all cases raising a FramingError (existing exception class) is the appropriate action.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kwall Keith Wall

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment