mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Change hachoir_parser to close input stream if no parser is found e.g. due to file corruption.
This commit is contained in:
parent
93eb79e237
commit
e17730a44a
3 changed files with 7 additions and 0 deletions
|
@ -177,6 +177,7 @@
|
||||||
* Fix allow propers to pp when show marked upgrade once
|
* Fix allow propers to pp when show marked upgrade once
|
||||||
* Fix never set episodes without airdate to wanted
|
* Fix never set episodes without airdate to wanted
|
||||||
* Change improve getting the local timezone information
|
* Change improve getting the local timezone information
|
||||||
|
* Change hachoir_parser to close input stream if no parser is found e.g. due to file corruption
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
* Change send nzb data to NZBGet for Anizb instead of url
|
* Change send nzb data to NZBGet for Anizb instead of url
|
||||||
|
|
|
@ -4,6 +4,7 @@ Libs with customisations...
|
||||||
/lib/dateutil/zoneinfo/__init__.py
|
/lib/dateutil/zoneinfo/__init__.py
|
||||||
/lib/hachoir_core/config.py
|
/lib/hachoir_core/config.py
|
||||||
/lib/hachoir_core/stream/input_helpers.py
|
/lib/hachoir_core/stream/input_helpers.py
|
||||||
|
/lib/hachoir_parser/guess.py
|
||||||
/lib/lockfile/mkdirlockfile.py
|
/lib/lockfile/mkdirlockfile.py
|
||||||
/lib/pynma/pynma.py
|
/lib/pynma/pynma.py
|
||||||
/lib/requests/packages/urllib3/connectionpool.py
|
/lib/requests/packages/urllib3/connectionpool.py
|
||||||
|
|
|
@ -91,6 +91,11 @@ class QueryParser(object):
|
||||||
parser = self.doparse(stream, fallback)
|
parser = self.doparse(stream, fallback)
|
||||||
if parser is not None:
|
if parser is not None:
|
||||||
stream._cached_parser = weakref.ref(parser)
|
stream._cached_parser = weakref.ref(parser)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
stream._input.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
def doparse(self, stream, fallback=True):
|
def doparse(self, stream, fallback=True):
|
||||||
|
|
Loading…
Reference in a new issue