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
58682b7f
Kaydet (Commit)
58682b7f
authored
Agu 11, 2001
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Only catch the errors that can actually occur, as reported in bug #411881.
üst
f3456912
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
types.py
Lib/types.py
+7
-3
urllib.py
Lib/urllib.py
+2
-2
No files found.
Lib/types.py
Dosyayı görüntüle @
58682b7f
...
...
@@ -31,7 +31,8 @@ FunctionType = type(_f)
LambdaType
=
type
(
lambda
:
None
)
# Same as FunctionType
try
:
CodeType
=
type
(
_f
.
func_code
)
except
:
except
RuntimeError
:
# Execution in restricted environment
pass
def
g
():
...
...
@@ -54,7 +55,8 @@ ModuleType = type(sys)
try
:
FileType
=
type
(
sys
.
__stdin__
)
except
:
except
AttributeError
:
# Not available in restricted mode
pass
XRangeType
=
type
(
xrange
(
0
))
...
...
@@ -65,7 +67,9 @@ except TypeError:
tb
=
sys
.
exc_info
()[
2
]
TracebackType
=
type
(
tb
)
FrameType
=
type
(
tb
.
tb_frame
)
except
:
except
AttributeError
:
# In the restricted environment, exc_info returns (None, None,
# None) Then, tb.tb_frame gives an attribute error
pass
tb
=
None
;
del
tb
...
...
Lib/urllib.py
Dosyayı görüntüle @
58682b7f
...
...
@@ -134,7 +134,7 @@ class URLopener:
for
file
in
self
.
__tempfiles
:
try
:
self
.
__unlink
(
file
)
except
:
except
OSError
:
pass
del
self
.
__tempfiles
[:]
if
self
.
tempcache
:
...
...
@@ -1069,7 +1069,7 @@ def unquote(s):
try
:
myappend
(
mychr
(
myatoi
(
item
[:
2
],
16
))
+
item
[
2
:])
except
:
except
ValueError
:
myappend
(
'
%
'
+
item
)
else
:
myappend
(
'
%
'
+
item
)
...
...
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