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
70eb2f91
Kaydet (Commit)
70eb2f91
authored
Ock 19, 2008
tarafından
Gregory P. Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix issue 1300: Quote command line arguments that contain a '|' character in
subprocess.list2cmdline (windows).
üst
92ffc634
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
subprocess.py
Lib/subprocess.py
+3
-3
test_subprocess.py
Lib/test/test_subprocess.py
+2
-0
No files found.
Lib/subprocess.py
Dosyayı görüntüle @
70eb2f91
...
...
@@ -471,8 +471,8 @@ def list2cmdline(seq):
2) A string surrounded by double quotation marks is
interpreted as a single argument, regardless of white space
contained within. A quoted string can be embedded in an
argument.
or pipe characters contained within. A quoted string can be
embedded in an
argument.
3) A double quotation mark preceded by a backslash is
interpreted as a literal double quotation mark.
...
...
@@ -498,7 +498,7 @@ def list2cmdline(seq):
if
result
:
result
.
append
(
' '
)
needquote
=
(
" "
in
arg
)
or
(
"
\t
"
in
arg
)
or
not
arg
needquote
=
(
" "
in
arg
)
or
(
"
\t
"
in
arg
)
or
(
"|"
in
arg
)
or
not
arg
if
needquote
:
result
.
append
(
'"'
)
...
...
Lib/test/test_subprocess.py
Dosyayı görüntüle @
70eb2f91
...
...
@@ -434,6 +434,8 @@ class ProcessTestCase(unittest.TestCase):
'"a
\\\\
b
\\
c" d e'
)
self
.
assertEqual
(
subprocess
.
list2cmdline
([
'ab'
,
''
]),
'ab ""'
)
self
.
assertEqual
(
subprocess
.
list2cmdline
([
'echo'
,
'foo|bar'
]),
'echo "foo|bar"'
)
def
test_poll
(
self
):
...
...
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