]> granicus.if.org Git - python/commitdiff
removing the last remaning apply() calls
authorTarek Ziadé <ziade.tarek@gmail.com>
Sat, 3 Oct 2009 00:07:35 +0000 (00:07 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Sat, 3 Oct 2009 00:07:35 +0000 (00:07 +0000)
Lib/distutils/archive_util.py
Lib/distutils/dir_util.py
Lib/distutils/filelist.py

index 75318eba616c2df73cda3b0ccea2fe7e50db6f06..4ace7bdbf00ece4f4aa974ad3787321c8395d487 100644 (file)
@@ -233,7 +233,7 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
         kwargs['owner'] = owner
         kwargs['group'] = group
 
-    filename = apply(func, (base_name, base_dir), kwargs)
+    filename = func(base_name, base_dir, **kwargs)
     if root_dir is not None:
         log.debug("changing back to '%s'", save_cwd)
         os.chdir(save_cwd)
index 55607e5b537918cf0af17f56d7f118f127c0d440..3e2cd353857b6ddc5216a0fc16c13fc9e6540d96 100644 (file)
@@ -190,7 +190,7 @@ def remove_tree(directory, verbose=1, dry_run=0):
     _build_cmdtuple(directory, cmdtuples)
     for cmd in cmdtuples:
         try:
-            apply(cmd[0], (cmd[1],))
+            cmd[0](cmd[1])
             # remove dir from cache if it's already there
             abspath = os.path.abspath(cmd[1])
             if abspath in _path_created:
index 7cf05098edc74ba85d73189ef1ce62c32a7540f4..4aac6d397a77bf7cd8b0e36dc3128fd6ef2cf3d5 100644 (file)
@@ -61,7 +61,7 @@ class FileList:
         sortable_files.sort()
         self.files = []
         for sort_tuple in sortable_files:
-            self.files.append(apply(os.path.join, sort_tuple))
+            self.files.append(os.path.join(*sort_tuple))
 
 
     # -- Other miscellaneous utility methods ---------------------------