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

Will Pierce commented on THRIFT-1515:
-------------------------------------

I attached a patch for this same fix to THRIFT-1115 which does the same thing 
(except uses 2 lines, to avoid going past the 80 char suggested limit of PEP8)

I'm happy with either one :-)
                
> NameError: global name 'TApplicationException' is not defined
> -------------------------------------------------------------
>
>                 Key: THRIFT-1515
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1515
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Compiler
>    Affects Versions: 0.9
>            Reporter: Jon Stephens
>         Attachments: thrift_1515.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> The Python Thrift generator does not include imports for all the exception 
> types it uses, namely, "TApplicationException".
> To reproduce:
> Create two Thrift services (A and B) and start them.
> Using the Python client for B, connect to A and call one of the methods from 
> the service.
> Expected result:
> {noformat}thrift.Thrift.TApplicationException: Invalid method name: 
> 'someMethod'{noformat}
> Actual Result:
> {noformat}NameError: global name 'TApplicationException' is not 
> defined{noformat}

--
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