Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec77274

Browse files
committed
ensure_filename() only takes one argument.
Call ensure_string() with one arg too, since the second value passed was the default.
1 parent adb2b38 commit ec77274

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Lib/distutils/command/bdist_packager.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,16 @@ def ensure_string_not_none (self,option,default=None):
6767
if val is None:
6868
raise DistutilsOptionError, "'%s' must be provided" % option
6969

70-
def ensure_script (self,arg):
70+
def ensure_script(self, arg):
7171
if not arg:
7272
return
7373
try:
74-
self.ensure_string(arg, None)
74+
self.ensure_string(arg)
7575
except:
7676
try:
77-
self.ensure_filename(arg, None)
77+
self.ensure_filename(arg)
7878
except:
79-
raise RuntimeError, \
80-
"cannot decipher script option (%s)" \
81-
% arg
79+
raise RuntimeError, "cannot decipher script option (%s)" % arg
8280

8381
def write_script (self,path,attr,default=None):
8482
""" write the script specified in attr to path. if attr is None,

0 commit comments

Comments
 (0)