From: Tim Peters Date: Wed, 23 Jul 2003 00:30:11 +0000 (+0000) Subject: locale-restoration code: Don't leave comparison to None implicit. For X-Git-Tag: v2.3c2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9390dd5b4aa5f32551ac9e5d9988930fbb8ad055;p=python locale-restoration code: Don't leave comparison to None implicit. For all I know, the original locale may be '' (I don't think that's possible, but ...), and if so we would certainly want to restore it. --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 12e65e5b8f..6f6d0f0eeb 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -331,7 +331,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, else: os.unlink(filename) - sys.exit(len(bad) > 0) + #sys.exit(len(bad) > 0) STDTESTS = [ diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index a677edd929..ef77e5e360 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -483,7 +483,7 @@ def test_main(): try: test_main_inner() finally: - if original_locale: + if original_locale is not None: locale.setlocale(locale.LC_ALL, original_locale) if __name__ == "__main__":