except IOError as e: if e.errno == errno.EACCES: return "some default data" # Not a permission error. elevateThen, according to the end result, your application can just keep functioning from there or you could code to prevent it If you'd like.When a neighborhood branch has an "upstream branch" configured for it, it is going to by default pull from