Patch for bug https://developer.blender.org/T63982
Details
Diff Detail
- Repository
- rBA Blender Add-ons
Event Timeline
| ant_landscape/stats.py | ||
|---|---|---|
| 28–32 | Code Style: There are missing spaces. Also, better use something like hasattr(self.process, "get_cpu_time"). This should work as well, right? Can you get the current version from psutil? Maybe then the check could be something like if psutil.version < .... | |
| ant_landscape/stats.py | ||
|---|---|---|
| 28–32 |
If I am reading Python docs correctly, yes.
You can, but I can't figure out when the change happened. | |
Update based on code review:
- Add comment to explain the change
- Use hasattr() instead of getattr()
- Hopefully fix code style issues
| ant_landscape/stats.py | ||
|---|---|---|
| 30 | Typo get_cpu_time vs get_cpu_times ? | |
Just for reference, the API was changed in version 2.0.
So this bug exists for more than 5 years^^
https://github.com/giampaolo/psutil/blob/master/HISTORY.rst#200