MCPcopy
hub / github.com/scrapy/scrapy / _store_in_thread

Method _store_in_thread

tests/test_feedexport.py:79–86  ·  view source on GitHub ↗
(self, file)

Source from the content-addressed store, hash-verified

77 self.path = Path(file_uri_to_path(uri))
78
79 def _store_in_thread(self, file):
80 dirname = self.path.parent
81 if dirname and not dirname.exists():
82 dirname.mkdir(parents=True)
83 with self.path.open("ab") as output_file:
84 output_file.write(file.read())
85
86 file.close()
87
88
89class FailingBlockingFeedStorage(DummyBlockingFeedStorage):

Callers

nothing calls this directly

Calls 4

readMethod · 0.80
openMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected