Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
30b13eeb
Kaydet (Commit)
30b13eeb
authored
Ock 23, 2012
tarafından
Łukasz Langa
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixes #4686. Reverts redundant picklability code from r74544.
üst
8fc732f0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
33 deletions
+9
-33
ConfigParser.py
Lib/ConfigParser.py
+9
-33
No files found.
Lib/ConfigParser.py
Dosyayı görüntüle @
30b13eeb
...
@@ -134,9 +134,6 @@ class Error(Exception):
...
@@ -134,9 +134,6 @@ class Error(Exception):
def
__repr__
(
self
):
def
__repr__
(
self
):
return
self
.
message
return
self
.
message
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
message
,)
__str__
=
__repr__
__str__
=
__repr__
class
NoSectionError
(
Error
):
class
NoSectionError
(
Error
):
...
@@ -145,9 +142,7 @@ class NoSectionError(Error):
...
@@ -145,9 +142,7 @@ class NoSectionError(Error):
def
__init__
(
self
,
section
):
def
__init__
(
self
,
section
):
Error
.
__init__
(
self
,
'No section:
%
r'
%
(
section
,))
Error
.
__init__
(
self
,
'No section:
%
r'
%
(
section
,))
self
.
section
=
section
self
.
section
=
section
self
.
args
=
(
section
,
)
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
section
,)
class
DuplicateSectionError
(
Error
):
class
DuplicateSectionError
(
Error
):
"""Raised when a section is multiply-created."""
"""Raised when a section is multiply-created."""
...
@@ -155,9 +150,7 @@ class DuplicateSectionError(Error):
...
@@ -155,9 +150,7 @@ class DuplicateSectionError(Error):
def
__init__
(
self
,
section
):
def
__init__
(
self
,
section
):
Error
.
__init__
(
self
,
"Section
%
r already exists"
%
section
)
Error
.
__init__
(
self
,
"Section
%
r already exists"
%
section
)
self
.
section
=
section
self
.
section
=
section
self
.
args
=
(
section
,
)
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
section
,)
class
NoOptionError
(
Error
):
class
NoOptionError
(
Error
):
"""A requested option was not found."""
"""A requested option was not found."""
...
@@ -167,9 +160,7 @@ class NoOptionError(Error):
...
@@ -167,9 +160,7 @@ class NoOptionError(Error):
(
option
,
section
))
(
option
,
section
))
self
.
option
=
option
self
.
option
=
option
self
.
section
=
section
self
.
section
=
section
self
.
args
=
(
option
,
section
)
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
option
,
self
.
section
)
class
InterpolationError
(
Error
):
class
InterpolationError
(
Error
):
"""Base class for interpolation-related exceptions."""
"""Base class for interpolation-related exceptions."""
...
@@ -178,9 +169,7 @@ class InterpolationError(Error):
...
@@ -178,9 +169,7 @@ class InterpolationError(Error):
Error
.
__init__
(
self
,
msg
)
Error
.
__init__
(
self
,
msg
)
self
.
option
=
option
self
.
option
=
option
self
.
section
=
section
self
.
section
=
section
self
.
args
=
(
option
,
section
,
msg
)
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
option
,
self
.
section
,
self
.
message
)
class
InterpolationMissingOptionError
(
InterpolationError
):
class
InterpolationMissingOptionError
(
InterpolationError
):
"""A string substitution required a setting which was not available."""
"""A string substitution required a setting which was not available."""
...
@@ -194,11 +183,7 @@ class InterpolationMissingOptionError(InterpolationError):
...
@@ -194,11 +183,7 @@ class InterpolationMissingOptionError(InterpolationError):
%
(
section
,
option
,
reference
,
rawval
))
%
(
section
,
option
,
reference
,
rawval
))
InterpolationError
.
__init__
(
self
,
option
,
section
,
msg
)
InterpolationError
.
__init__
(
self
,
option
,
section
,
msg
)
self
.
reference
=
reference
self
.
reference
=
reference
self
.
_rawval
=
rawval
self
.
args
=
(
option
,
section
,
rawval
,
reference
)
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
option
,
self
.
section
,
self
.
_rawval
,
self
.
reference
)
class
InterpolationSyntaxError
(
InterpolationError
):
class
InterpolationSyntaxError
(
InterpolationError
):
"""Raised when the source text into which substitutions are made
"""Raised when the source text into which substitutions are made
...
@@ -214,28 +199,21 @@ class InterpolationDepthError(InterpolationError):
...
@@ -214,28 +199,21 @@ class InterpolationDepthError(InterpolationError):
"
\t
rawval :
%
s
\n
"
"
\t
rawval :
%
s
\n
"
%
(
section
,
option
,
rawval
))
%
(
section
,
option
,
rawval
))
InterpolationError
.
__init__
(
self
,
option
,
section
,
msg
)
InterpolationError
.
__init__
(
self
,
option
,
section
,
msg
)
self
.
_rawval
=
rawval
self
.
args
=
(
option
,
section
,
rawval
)
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
option
,
self
.
section
,
self
.
_rawval
)
class
ParsingError
(
Error
):
class
ParsingError
(
Error
):
"""Raised when a configuration file does not follow legal syntax."""
"""Raised when a configuration file does not follow legal syntax."""
def
__init__
(
self
,
filename
,
_errors
=
[]
):
def
__init__
(
self
,
filename
):
Error
.
__init__
(
self
,
'File contains parsing errors:
%
s'
%
filename
)
Error
.
__init__
(
self
,
'File contains parsing errors:
%
s'
%
filename
)
self
.
filename
=
filename
self
.
filename
=
filename
self
.
errors
=
[]
self
.
errors
=
[]
for
lineno
,
line
in
_errors
:
self
.
args
=
(
filename
,
)
self
.
append
(
lineno
,
line
)
def
append
(
self
,
lineno
,
line
):
def
append
(
self
,
lineno
,
line
):
self
.
errors
.
append
((
lineno
,
line
))
self
.
errors
.
append
((
lineno
,
line
))
self
.
message
+=
'
\n\t
[line
%2
d]:
%
s'
%
(
lineno
,
line
)
self
.
message
+=
'
\n\t
[line
%2
d]:
%
s'
%
(
lineno
,
line
)
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
filename
,
self
.
errors
)
class
MissingSectionHeaderError
(
ParsingError
):
class
MissingSectionHeaderError
(
ParsingError
):
"""Raised when a key-value pair is found before any section header."""
"""Raised when a key-value pair is found before any section header."""
...
@@ -247,9 +225,7 @@ class MissingSectionHeaderError(ParsingError):
...
@@ -247,9 +225,7 @@ class MissingSectionHeaderError(ParsingError):
self
.
filename
=
filename
self
.
filename
=
filename
self
.
lineno
=
lineno
self
.
lineno
=
lineno
self
.
line
=
line
self
.
line
=
line
self
.
args
=
(
filename
,
lineno
,
line
)
def
__reduce__
(
self
):
return
self
.
__class__
,
(
self
.
filename
,
self
.
lineno
,
self
.
line
)
class
RawConfigParser
:
class
RawConfigParser
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment