MCPcopy Create free account
hub / github.com/CSAILVision/gandissect / MakeLinkWorker

Class MakeLinkWorker

netdissect/tool/allunitsample.py:172–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170 Image.fromarray(data).save(filename, optimize=True, quality=100)
171
172class MakeLinkWorker(WorkerBase):
173 # Creating symbolic links is a bit slow and can be done faster
174 # in parallel rather than waiting for each to be created.
175 def work(self, sourcename, targname):
176 try:
177 os.link(sourcename, targname)
178 except OSError as e:
179 if e.errno == errno.EEXIST:
180 os.remove(targname)
181 os.link(sourcename, targname)
182 else:
183 raise
184
185class MakeSyminkWorker(WorkerBase):
186 # Creating symbolic links is a bit slow and can be done faster

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected