Rather than disabling the pylint warning, why don't you actually catch the exception that you're expecting that this could throw? Pylint warns about this for a reason.