We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 244cd0b commit 70ba65aCopy full SHA for 70ba65a
Lib/test/support/script_helper.py
@@ -352,12 +352,11 @@ class EnsureSafeUserHistory(unittest.TestCase):
352
353
@classmethod
354
def setUpClass(cls):
355
- if history_file := _site_gethistoryfile():
356
- if os.path.exists(history_file):
357
- cls.__history_file = history_file
358
- cls.__history_stat = _file_signature(history_file)
359
- else:
360
- cls.__history_file = cls.__history_stat = None
+ cls.__history_file = cls.__history_stat = None
+ history_file = _site_gethistoryfile()
+ if os.path.exists(history_file):
+ cls.__history_file = history_file
+ cls.__history_stat = _file_signature(history_file)
361
362
def tearDown(self):
363
super().tearDown()
0 commit comments