title: Catch only some runtime errors in Python
body: <p>I'm importing a module which raises the following error in some conditions:
      RuntimeError: pyparted requires root access</p>
  
  <p>I know that I can just check for root access before the import, but I'd like to know how to catch this spesific kind of error via a try/except statement for future reference. Is there any way to differentiate between this RuntimeError and others that might be raised?</p>