Caught exception in plugin method "grub2.setup()" during sosreport execution

Solution Verified - Updated -

Issue

  • Running sosreport logs the below error:
$ cat grub2-plugin-errors.txt 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1252, in setup
    plug.setup()
  File "/usr/lib/python2.7/site-packages/sos/plugins/grub2.py", line 34, in setup
    "/etc/grub.d"
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 572, in add_copy_spec
    files.sort(key=getmtime, reverse=True)
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 569, in getmtime
    except (OSError, FileNotFoundError):
NameError: global name 'FileNotFoundError' is not defined

Environment

  • Red Hat Enterprise Linux 7
    • seen on sos-3.5-9.el7_5 and below.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content