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

ASF GitHub Bot commented on ARROW-1768:
---------------------------------------

wesm closed pull request #1286: ARROW-1768: [Python] Fix suppressed exception 
in ParquetWriter.__del__
URL: https://github.com/apache/arrow/pull/1286
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/pyarrow/parquet.py b/python/pyarrow/parquet.py
index 9dcc30c8a..9e0749bb3 100644
--- a/python/pyarrow/parquet.py
+++ b/python/pyarrow/parquet.py
@@ -260,7 +260,7 @@ def __init__(self, where, schema, flavor=None,
         self.is_open = True
 
     def __del__(self):
-        if self.is_open:
+        if getattr(self, 'is_open', False):
             self.close()
 
     def write_table(self, table, row_group_size=None):


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] Fix suppressed exception in ParquetWriter.__del__
> ----------------------------------------------------------
>
>                 Key: ARROW-1768
>                 URL: https://issues.apache.org/jira/browse/ARROW-1768
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Wes McKinney
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>
> {code}
> pyarrow-test-2.7/lib/python2.7/site-packages/pyarrow/tests/test_parquet.py::test_coerce_timestamps
>  Exception AttributeError: "'ParquetWriter' object has no attribute 
> 'is_open'" in <bound method ParquetWriter.__del__ of 
> <pyarrow.parquet.ParquetWriter object at 0x11bc1f4d0>> ignored
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to