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

ASF GitHub Bot commented on BEAM-3416:
--------------------------------------

arostamianfar opened a new pull request #4349: [BEAM-3416] Fixes unclosed files 
in VcfSource when exception is thrown.
URL: https://github.com/apache/beam/pull/4349
 
 
   Throw the exception inside TextSource, which ensures that the file is 
properly closed inside the 'with' statement inside TextSource.
   
   @chamikaramj 

----------------------------------------------------------------
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:
[email protected]


> File is not properly close in VcfSource when exception is thrown
> ----------------------------------------------------------------
>
>                 Key: BEAM-3416
>                 URL: https://issues.apache.org/jira/browse/BEAM-3416
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Asha Rostamianfar
>            Assignee: Asha Rostamianfar
>            Priority: Minor
>
> Files are not properly closed when an exception is thrown in VcfSource 
> (apache_beam/io/vcfio.py).
> This is because the file is opened within TextSource (using a 'with' 
> statement), but the exception in VcfSource is thrown outside of that scope.
> This only causes an issue in Windows unit tests where files cannot be deleted 
> if they're used by another process.



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

Reply via email to