kquick / Thespian

Python Actor concurrency library
MIT License
189 stars 24 forks source link

Fix a simultaneous file access error in Director when generating sources #55

Closed dendron2000 closed 4 years ago

dendron2000 commented 4 years ago

When trying to create a source package using thespian.Director on Windows I got this error:

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process

It seems there is a blunder in the source code which tries to rename a file while keeping it open inside the context (by using the "with" statement).

kquick commented 4 years ago

Oh good catch, thank you!