From: Tarek Ziadé Date: Sat, 24 Oct 2009 15:51:30 +0000 (+0000) Subject: fixed warning and error message X-Git-Tag: v2.7a1~250 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1733c9362b7520278120423550de28da44d15f33;p=python fixed warning and error message --- diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index 9b9f551830..5c7b473b04 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -374,7 +374,7 @@ class build_py(Command): def byte_compile(self, files): if sys.dont_write_bytecode: - self.warn('byte-compile not supported on this platform, skipping.') + self.warn('byte-compiling is disabled, skipping.') return from distutils.util import byte_compile diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py index 7b4b45be79..043e8b6e27 100644 --- a/Lib/distutils/command/install_lib.py +++ b/Lib/distutils/command/install_lib.py @@ -121,7 +121,7 @@ class install_lib(Command): def byte_compile(self, files): if sys.dont_write_bytecode: - self.warn('byte-compile not supported on this platform, skipping.') + self.warn('byte-compiling is disabled, skipping.') return from distutils.util import byte_compile diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py index e8c7ca921c..bfe6154273 100644 --- a/Lib/distutils/tests/test_build_py.py +++ b/Lib/distutils/tests/test_build_py.py @@ -103,7 +103,7 @@ class BuildPyTestCase(support.TempdirManager, finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertTrue('byte-compile not supported ' in self.logs[0][1]) + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) def test_suite(): return unittest.makeSuite(BuildPyTestCase) diff --git a/Lib/distutils/tests/test_install_lib.py b/Lib/distutils/tests/test_install_lib.py index fab66d15ae..99a6d90627 100644 --- a/Lib/distutils/tests/test_install_lib.py +++ b/Lib/distutils/tests/test_install_lib.py @@ -92,7 +92,7 @@ class InstallLibTestCase(support.TempdirManager, finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertTrue('byte-compile not supported ' in self.logs[0][1]) + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) def test_suite(): return unittest.makeSuite(InstallLibTestCase) diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index a87ef44a27..6bff44f786 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -448,7 +448,7 @@ def byte_compile(py_files, optimize=0, force=0, prefix=None, base_dir=None, """ # nothing is done if sys.dont_write_bytecode is True if sys.dont_write_bytecode: - raise DistutilsByteCompileError('byte-compiling not supported.') + raise DistutilsByteCompileError('byte-compiling is disabled.') # First, if the caller didn't force us into direct or indirect mode, # figure out which mode we should be in. We take a conservative