dispatch: extract common logic for handling ParseError
The way ParseError is handled at two different places in dispatch.py is the
same. Move common logic into _formatparse.
from __future__ import absolute_importimport pkgutil__path__ = pkgutil.extend_path(__path__, __name__)