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
ead70565
Kaydet (Commit)
ead70565
authored
Agu 13, 2007
tarafından
Lars Gustäbel
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Retouch my last change after a comment on style from Guido.
üst
0f98d8f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
gzip.py
Lib/gzip.py
+7
-10
No files found.
Lib/gzip.py
Dosyayı görüntüle @
ead70565
...
...
@@ -149,18 +149,15 @@ class GzipFile:
def
_write_gzip_header
(
self
):
self
.
fileobj
.
write
(
b
'
\037\213
'
)
# magic header
self
.
fileobj
.
write
(
b
'
\010
'
)
# compression method
fname
=
self
.
name
if
fname
.
endswith
(
".gz"
):
fname
=
fname
[:
-
3
]
flags
=
0
# RFC 1952 requires the FNAME field to be Latin-1. Do not
# include filenames that cannot be represented that way.
try
:
fname
=
fname
.
encode
(
'latin-1'
)
# RFC 1952 requires the FNAME field to be Latin-1. Do not
# include filenames that cannot be represented that way.
fname
=
self
.
name
.
encode
(
'latin-1'
)
if
fname
.
endswith
(
b
'.gz'
):
fname
=
fname
[:
-
3
]
except
UnicodeEncodeError
:
fname
=
''
fname
=
b
''
flags
=
0
if
fname
:
flags
=
FNAME
self
.
fileobj
.
write
(
chr
(
flags
)
.
encode
(
'latin-1'
))
...
...
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