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
d7faa816
Kaydet (Commit)
d7faa816
authored
Agu 02, 2000
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replaced 'execute()' method with a thin wrapper around 'util.execute()'.
üst
1c16ac36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
25 deletions
+1
-25
cmd.py
Lib/distutils/cmd.py
+1
-25
No files found.
Lib/distutils/cmd.py
Dosyayı görüntüle @
d7faa816
...
@@ -318,31 +318,7 @@ class Command:
...
@@ -318,31 +318,7 @@ class Command:
def
execute
(
self
,
func
,
args
,
msg
=
None
,
level
=
1
):
def
execute
(
self
,
func
,
args
,
msg
=
None
,
level
=
1
):
"""Perform some action that affects the outside world (eg. by
util
.
execute
(
func
,
args
,
msg
,
self
.
verbose
>=
level
,
self
.
dry_run
)
writing to the filesystem). Such actions are special because they
should be disabled by the "dry run" flag, and should announce
themselves if the current verbosity level is high enough. This
method takes care of all that bureaucracy for you; all you have to
do is supply the function to call and an argument tuple for it (to
embody the "external action" being performed), a message to print
if the verbosity level is high enough, and an optional verbosity
threshold.
"""
# Generate a message if we weren't passed one
if
msg
is
None
:
msg
=
"
%
s
%
s"
%
(
func
.
__name__
,
`args`
)
if
msg
[
-
2
:]
==
',)'
:
# correct for singleton tuple
msg
=
msg
[
0
:
-
2
]
+
')'
# Print it if verbosity level is high enough
self
.
announce
(
msg
,
level
)
# And do it, as long as we're not in dry-run mode
if
not
self
.
dry_run
:
apply
(
func
,
args
)
# execute()
def
mkpath
(
self
,
name
,
mode
=
0777
):
def
mkpath
(
self
,
name
,
mode
=
0777
):
...
...
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