Issue #4686 - add .args to exceptions in the configparsermodule
diff --git a/Lib/configparser.py b/Lib/configparser.py
index d0b03f9..d11164f 100644
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -142,6 +142,7 @@
     def __init__(self, section):
         Error.__init__(self, 'No section: %r' % (section,))
         self.section = section
+        self.args = (section, )
 
 class DuplicateSectionError(Error):
     """Raised when a section is multiply-created."""
@@ -149,6 +150,7 @@
     def __init__(self, section):
         Error.__init__(self, "Section %r already exists" % section)
         self.section = section
+        self.args = (section, )
 
 class NoOptionError(Error):
     """A requested option was not found."""
@@ -158,6 +160,7 @@
                        (option, section))
         self.option = option
         self.section = section
+        self.args = (option, section)
 
 class InterpolationError(Error):
     """Base class for interpolation-related exceptions."""
@@ -166,6 +169,7 @@
         Error.__init__(self, msg)
         self.option = option
         self.section = section
+        self.args = (option, section, msg)
 
 class InterpolationMissingOptionError(InterpolationError):
     """A string substitution required a setting which was not available."""
@@ -179,6 +183,7 @@
                % (section, option, reference, rawval))
         InterpolationError.__init__(self, option, section, msg)
         self.reference = reference
+        self.args = (option, section, rawval, reference)
 
 class InterpolationSyntaxError(InterpolationError):
     """Raised when the source text into which substitutions are made
@@ -194,6 +199,7 @@
                "\trawval : %s\n"
                % (section, option, rawval))
         InterpolationError.__init__(self, option, section, msg)
+        self.args = (option, section, rawval)
 
 class ParsingError(Error):
     """Raised when a configuration file does not follow legal syntax."""
@@ -202,6 +208,7 @@
         Error.__init__(self, 'File contains parsing errors: %s' % filename)
         self.filename = filename
         self.errors = []
+        self.args = (filename, )
 
     def append(self, lineno, line):
         self.errors.append((lineno, line))
@@ -218,7 +225,7 @@
         self.filename = filename
         self.lineno = lineno
         self.line = line
-
+        self.args = (filename, lineno, line)
 
 class RawConfigParser:
     def __init__(self, defaults=None, dict_type=_default_dict,