mirror of
https://github.com/python/cpython.git
synced 2025-08-29 13:15:11 +00:00
Merge with 3.3
This commit is contained in:
commit
ec53111f76
3 changed files with 10 additions and 17 deletions
|
@ -882,12 +882,9 @@ class EditorWindow(object):
|
|||
"Load and update the recent files list and menus"
|
||||
rf_list = []
|
||||
if os.path.exists(self.recent_files_path):
|
||||
rf_list_file = open(self.recent_files_path,'r',
|
||||
encoding='utf_8', errors='replace')
|
||||
try:
|
||||
with open(self.recent_files_path, 'r',
|
||||
encoding='utf_8', errors='replace') as rf_list_file:
|
||||
rf_list = rf_list_file.readlines()
|
||||
finally:
|
||||
rf_list_file.close()
|
||||
if new_file:
|
||||
new_file = os.path.abspath(new_file) + '\n'
|
||||
if new_file in rf_list:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue