

class EditorConfigError(Exception):
    """Parent class of all exceptions raised by EditorConfig"""


from ConfigParser import ParsingError as _ParsingError


class ParsingError(_ParsingError, EditorConfigError):
    """Error raised if an EditorConfig file could not be parsed"""


class PathError(ValueError, EditorConfigError):
    """Error raised if invalid filepath is specified"""


class VersionError(ValueError, EditorConfigError):
    """Error raised if invalid version number is specified"""



class EditorConfigError(Exception):
    """Parent class of all exceptions raised by EditorConfig"""


try:
    from ConfigParser import ParsingError as _ParsingError
except:
    from configparser import ParsingError as _ParsingError


class ParsingError(_ParsingError, EditorConfigError):
    """Error raised if an EditorConfig file could not be parsed"""


class PathError(ValueError, EditorConfigError):
    """Error raised if invalid filepath is specified"""


class VersionError(ValueError, EditorConfigError):
    """Error raised if invalid version number is specified"""

Fix broken ConfigParser import for Python3
Fix broken ConfigParser import for Python3

  
  
  class EditorConfigError(Exception):
      """Parent class of all exceptions raised by EditorConfig"""
  
  
+ try:
- from ConfigParser import ParsingError as _ParsingError
+     from ConfigParser import ParsingError as _ParsingError
+ except:
+     from configparser import ParsingError as _ParsingError
  
  
  class ParsingError(_ParsingError, EditorConfigError):
      """Error raised if an EditorConfig file could not be parsed"""
  
  
  class PathError(ValueError, EditorConfigError):
      """Error raised if invalid filepath is specified"""
  
  
  class VersionError(ValueError, EditorConfigError):
      """Error raised if invalid version number is specified"""
  
Fix broken ConfigParser import for Python3
## Code Before:


class EditorConfigError(Exception):
    """Parent class of all exceptions raised by EditorConfig"""


from ConfigParser import ParsingError as _ParsingError


class ParsingError(_ParsingError, EditorConfigError):
    """Error raised if an EditorConfig file could not be parsed"""


class PathError(ValueError, EditorConfigError):
    """Error raised if invalid filepath is specified"""


class VersionError(ValueError, EditorConfigError):
    """Error raised if invalid version number is specified"""

## Instruction:
Fix broken ConfigParser import for Python3
## Code After:


class EditorConfigError(Exception):
    """Parent class of all exceptions raised by EditorConfig"""


try:
    from ConfigParser import ParsingError as _ParsingError
except:
    from configparser import ParsingError as _ParsingError


class ParsingError(_ParsingError, EditorConfigError):
    """Error raised if an EditorConfig file could not be parsed"""


class PathError(ValueError, EditorConfigError):
    """Error raised if invalid filepath is specified"""


class VersionError(ValueError, EditorConfigError):
    """Error raised if invalid version number is specified"""
