-
Notifications
You must be signed in to change notification settings - Fork 576
Closed
Labels
bugSomething isn't working as it's supposed toSomething isn't working as it's supposed to
Milestone
Description
Hello
I just had a little overview to the project and found the file singleton.py with singleinstance class especially.
The design of this class is incorrect because of two things as below:
- This class has to ensure that lock file is being deleted when app is closed (as far as I understand it). But it won't work. Well, it would, probably, but as it's stated in python doc, it's not guaranteed that
__del__method will ever called. So it can easily lead to situation when lock file remains in system after app shutdown. - There is
try..exceptblock in__del__method which would not work ever because, as stated in python doc, any exception that occurs while running__del__method will be ignored and just printed a warning in stderr instead.
Thus, I'd suggest to either make some other method like release() that should be called directly or redesign this class\idea.
Thanks,
Constantine
Metadata
Metadata
Assignees
Labels
bugSomething isn't working as it's supposed toSomething isn't working as it's supposed to