qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-6473) Remove remaining Python <= 2.5 raise syntax (i.e. raise "...") from connection08.py
Date Fri, 03 Apr 2015 13:34:52 GMT

    [ https://issues.apache.org/jira/browse/QPID-6473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14394424#comment-14394424
] 

ASF subversion and git services commented on QPID-6473:
-------------------------------------------------------

Commit 1671072 from [~k-wall] in branch 'qpid/trunk'
[ https://svn.apache.org/r1671072 ]

QPID-6473: [Python Client] Replace old style exception syntax on a number of paths through
08..0-9 code

> Remove remaining Python <= 2.5 raise syntax (i.e. raise "...") from connection08.py
> -----------------------------------------------------------------------------------
>
>                 Key: QPID-6473
>                 URL: https://issues.apache.org/jira/browse/QPID-6473
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>            Reporter: Keith Wall
>
> 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:
> {noformat}
> 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
> {noformat} 
> It appears in all cases raising a FramingError (existing exception class) is the appropriate
action.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message