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

Dave Watson commented on THRIFT-1373:
-------------------------------------

Ooops, when I ran make check it didn't catch this:

{code}
diff --git a/compiler/cpp/src/generate/t_py_generator.cc 
b/compiler/cpp/src/generate/t_py_generator.cc
index 1a75fd8..a2ea8b0 100644
--- a/compiler/cpp/src/generate/t_py_generator.cc
+++ b/compiler/cpp/src/generate/t_py_generator.cc
@@ -406,7 +406,7 @@ string t_py_generator::py_autogen_comment() {
  */
 string t_py_generator::py_imports() {
   return
-    string("from thrift.Thrift import TType, TMessageType");
+    string("from thrift.Thrift import TType, TMessageType, TException");
 }
{code}
                
> Fix user-defined exception generation in thrift (python)
> --------------------------------------------------------
>
>                 Key: THRIFT-1373
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1373
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>            Reporter: Dave Watson
>            Assignee: Dave Watson
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 
> 0001-Fix-user-defined-exception-generation-in-thrift-pyth.patch
>
>
> From 85a1ebf8d439ccb71db2c2fd586949f563339be7 Mon Sep 17 00:00:00 2001
> From: Doug Ihde <[email protected]>
> Date: Fri, 29 Jan 2010 19:45:23 +0000
> Subject: [PATCH 1/9] Fix user-defined exception generation in thrift (python)
> Summary: Fixed python code generation so that user-defined exceptions have a
>          base class of TException rather than Exception.
> Test Plan: Build [a facebook project] which is a python test
>            client. Run the test client with
>            invalid args so that the server throws an exception. Ensure
>            that exception is properly returned to the test client
>            with the "message" field set and without warning
>            "Exception.message has been deprecated in Python 2.6".
> Conflicts:
>       compiler/cpp/src/generate/t_py_generator.cc
> ---
>  compiler/cpp/src/generate/t_py_generator.cc |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to