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:
parent
36f7e938f2
commit
9390dd5b4a
|
@ -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 = [
|
||||
|
|
|
@ -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__":
|
||||
|
|
Loading…
Reference in New Issue