MCPcopy Create free account
hub / github.com/Jack-Cherish/python-spider / SeekZero

Function SeekZero

2020/bilibili/xml2ass.py:28–35  ·  view source on GitHub ↗
(function)

Source from the content-addressed store, hash-verified

26gettext.install('danmaku2ass', os.path.join(os.path.dirname(os.path.abspath(os.path.realpath(sys.argv[0] or 'locale'))), 'locale'))
27
28def SeekZero(function):
29 def decorated_function(file_):
30 file_.seek(0)
31 try:
32 return function(file_)
33 finally:
34 file_.seek(0)
35 return decorated_function
36
37
38def EOFAsNone(function):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected