other than IOError as e: if e.errno == errno.EACCES: return "some default data" # Not a permission error. raiseDetecting race circumstances might be challenging, but there are a pair signals. Code which relies greatly on sleeps is liable to race disorders, so to start with look for calls to snooze from the influenced code. Adding notably prolonged