bgreenlee/pygtail — pull request #6 by msabramo (2012-05-09 15:16:50+00:00)
Title: Clean up self._filehandle() in Pygtail.__del__

eliminates warnings when running tests in Python 3.2:

```
test_logrotate (pygtail.test.test_pygtail.PygtailTest) ... /Users/marc/dev/git-repos/pygtail/pygtail/test/test_pygtail.py:60: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/tmpq_86j3' mode='r' encoding='UTF-8'>
pygtail = Pygtail(self.logfile.name)
/usr/local/Cellar/python3/3.2.3/lib/python3.2/unittest/case.py:370: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/tmpq_86j3' mode='r' encoding='UTF-8'>
function()
ok
test_read (pygtail.test.test_pygtail.PygtailTest) ... /usr/local/Cellar/python3/3.2.3/lib/python3.2/unittest/case.py:370: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/tmpjh32i4' mode='r' encoding='UTF-8'>
function()
ok
test_readlines (pygtail.test.test_pygtail.PygtailTest) ... /usr/local/Cellar/python3/3.2.3/lib/python3.2/unittest/case.py:370: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/tmpxpo6vm' mode='r' encoding='UTF-8'>
function()
ok
test_subsequent_read_with_new_data (pygtail.test.test_pygtail.PygtailTest) ... /usr/local/Cellar/python3/3.2.3/lib/python3.2/unittest/case.py:370: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/tmp2ur1g0' mode='r' encoding='UTF-8'>
function()
ok
test_subsequent_read_with_no_new_data (pygtail.test.test_pygtail.PygtailTest) ... /usr/local/Cellar/python3/3.2.3/lib/python3.2/unittest/case.py:370: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/EV/EVpZ2D-dFr0Q0VP8cVxFc++++TI/-Tmp-/tmpadd2bf' mode='r' encoding='UTF-8'>
function()
ok
```