Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[report] Fix traceback when running plugins_overview.py
Running plugins_overview.py after commit be1ad32 resulted in the following traceback: Traceback (most recent call last): File "/sos_plugin_overview_fix/plugins_overview.py", line 92, in <module> with open(os.path.join(PLUGDIR, plugfile), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'str' object does not support the context manager protocol This is because the call to read() returns a str and it was happening within the 'with' statement. This fix separates the action of opening the file via 'with' and the action of reading its content via 'read()'. Signed-off-by: Jose Castillo <[email protected]>
- Loading branch information