prashantsengar / TimeTracker

Basic Time tracker built with Python. Track what applications you spend your most time on.
16 stars 12 forks source link

Fix of switching apps error #7

Open suchintan-p opened 4 years ago

suchintan-p commented 4 years ago

"_exceptions" is not an attribute of psutil, hence attribute error was shown.

prashantsengar commented 4 years ago

@suchintan-p are you sure this works? Have you tried it out on your PC? I have a doubt because since you said that _exceptions is not a part of psutil then even if you use it in a try-except block, it will give the same attribute error.

suchintan-p commented 4 years ago

Yes I have tried it in my PC, and it's working fine. 'psutil.NoSuchProcess' is a valid exception class rather than 'psutil._exceptions.NoSuchProcess' as ' _exceptions' is not a part of psutil.

On Sat, Dec 7, 2019 at 6:22 PM Prashant Sengar notifications@github.com wrote:

@suchintan-p https://github.com/suchintan-p are you sure this works? Have you tried it out on your PC? I have a doubt because since you said that _exceptions is not a part of psutil then even if you use it in a try-except block, it will give the same attribute error.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/prashantsengar/TimeTracker/pull/7?email_source=notifications&email_token=ANRG3INZQ3IED3E32ZNQU6TQXOMB3A5CNFSM4JXME252YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGGINY#issuecomment-562848823, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANRG3INMOTHSY6QGPDNA523QXOMB3ANCNFSM4JXME25Q .

-- Suchintan

prashantsengar commented 4 years ago

@suchintan-p, you should create a different PR for this