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.
This commit is contained in:
Tim Peters 2003-07-23 00:30:11 +00:00
parent 36f7e938f2
commit 9390dd5b4a
2 changed files with 2 additions and 2 deletions

View File

@ -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 = [

View 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__":