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
5ac6d80c
Kaydet (Commit)
5ac6d80c
authored
Kas 06, 2010
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Also close file descriptors from os.popen and subprocess.Popen
üst
25b57413
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
20 deletions
+26
-20
bdist_rpm.py
Lib/distutils/command/bdist_rpm.py
+20
-16
msvc9compiler.py
Lib/distutils/msvc9compiler.py
+6
-4
No files found.
Lib/distutils/command/bdist_rpm.py
Dosyayı görüntüle @
5ac6d80c
...
...
@@ -343,22 +343,26 @@ class bdist_rpm(Command):
src_rpm
,
non_src_rpm
,
spec_path
)
out
=
os
.
popen
(
q_cmd
)
binary_rpms
=
[]
source_rpm
=
None
while
True
:
line
=
out
.
readline
()
if
not
line
:
break
l
=
line
.
strip
()
.
split
()
assert
(
len
(
l
)
==
2
)
binary_rpms
.
append
(
l
[
1
])
# The source rpm is named after the first entry in the spec file
if
source_rpm
is
None
:
source_rpm
=
l
[
0
]
status
=
out
.
close
()
if
status
:
raise
DistutilsExecError
(
"Failed to execute:
%
s"
%
repr
(
q_cmd
))
try
:
binary_rpms
=
[]
source_rpm
=
None
while
True
:
line
=
out
.
readline
()
if
not
line
:
break
l
=
line
.
strip
()
.
split
()
assert
(
len
(
l
)
==
2
)
binary_rpms
.
append
(
l
[
1
])
# The source rpm is named after the first entry in the spec file
if
source_rpm
is
None
:
source_rpm
=
l
[
0
]
status
=
out
.
close
()
if
status
:
raise
DistutilsExecError
(
"Failed to execute:
%
s"
%
repr
(
q_cmd
))
finally
:
out
.
close
()
self
.
spawn
(
rpm_cmd
)
...
...
Lib/distutils/msvc9compiler.py
Dosyayı görüntüle @
5ac6d80c
...
...
@@ -263,10 +263,12 @@ def query_vcvarsall(version, arch="x86"):
popen
=
subprocess
.
Popen
(
'"
%
s"
%
s & set'
%
(
vcvarsall
,
arch
),
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
stdout
,
stderr
=
popen
.
communicate
()
if
popen
.
wait
()
!=
0
:
raise
DistutilsPlatformError
(
stderr
.
decode
(
"mbcs"
))
try
:
stdout
,
stderr
=
popen
.
communicate
()
if
popen
.
wait
()
!=
0
:
raise
DistutilsPlatformError
(
stderr
.
decode
(
"mbcs"
))
finally
:
popen
.
close
()
stdout
=
stdout
.
decode
(
"mbcs"
)
for
line
in
stdout
.
split
(
"
\n
"
):
...
...
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