]> granicus.if.org Git - python/commitdiff
locale-restoration code: Don't leave comparison to None implicit. For
authorTim Peters <tim.peters@gmail.com>
Wed, 23 Jul 2003 00:30:11 +0000 (00:30 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 23 Jul 2003 00:30:11 +0000 (00:30 +0000)
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.

Lib/test/regrtest.py
Lib/test/test_logging.py

index 12e65e5b8fe4f34ffd6b343df980cc17d5e26cac..6f6d0f0eeb0dc9b54cfaaca382f4f346ae99cd31 100755 (executable)
@@ -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 = [
index a677edd9290a9efd920fc2577f26a481c87b665d..ef77e5e3602f361f83eaaaea80fd6a92074d8397 100644 (file)
@@ -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__":