Merge: #24903: Remove misleading error message to fix regression.

This commit is contained in:
R David Murray 2015-12-04 23:04:37 -05:00
commit 939614c48c
4 changed files with 5 additions and 11 deletions

View File

@ -238,9 +238,6 @@ def main():
args = parser.parse_args()
compile_dests = args.compile_dest
if (args.ddir and (len(compile_dests) != 1
or not os.path.isdir(compile_dests[0]))):
parser.exit('-d destdir requires exactly one directory argument')
if args.rx:
import re
args.rx = re.compile(args.rx)

View File

@ -398,14 +398,6 @@ class CommandLineTests(unittest.TestCase):
self.assertCompiled(init2fn)
self.assertCompiled(bar2fn)
def test_d_takes_exactly_one_dir(self):
rc, out, err = self.assertRunNotOK('-d', 'foo')
self.assertEqual(out, b'')
self.assertRegex(err, b'-d')
rc, out, err = self.assertRunNotOK('-d', 'foo', 'bar')
self.assertEqual(out, b'')
self.assertRegex(err, b'-d')
def test_d_compile_error(self):
script_helper.make_script(self.pkgdir, 'crunchyfrog', 'bad(syntax')
rc, out, err = self.assertRunNotOK('-q', '-d', 'dinsdale', self.pkgdir)

View File

@ -477,6 +477,7 @@ Raymund Galvin
Nitin Ganatra
Fred Gansevles
Lars Marius Garshol
Jake Garver
Dan Gass
Andrew Gaul
Matthieu Gautier

View File

@ -22,6 +22,10 @@ Core and Builtins
Library
-------
- Issue #24903: Fix regression in number of arguments compileall accepts when
'-d' is specified. The check on the number of arguments has been dropped
completely as it never worked correctly anyway.
- Issue #25764: In the subprocess module, preserve any exception caused by
fork() failure when preexec_fn is used.