Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
e6fc52ae
Commit
e6fc52ae
authored
Jan 25, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harden a tiny bit against recent_files list load failures
parent
749a8566
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
pronterface.py
printrun/pronterface.py
+7
-1
No files found.
printrun/pronterface.py
View file @
e6fc52ae
...
...
@@ -836,6 +836,7 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
def
update_recent_files
(
self
,
param
,
value
):
if
self
.
filehistory
is
None
:
return
recent_files
=
[]
try
:
recent_files
=
json
.
loads
(
value
)
except
:
...
...
@@ -1641,7 +1642,12 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
self
.
set
(
"last_file_path"
,
path
)
try
:
abspath
=
os
.
path
.
abspath
(
name
)
recent_files
=
json
.
loads
(
self
.
settings
.
recentfiles
)
recent_files
=
[]
try
:
recent_files
=
json
.
loads
(
self
.
settings
.
recentfiles
)
except
:
self
.
logError
(
_
(
"Failed to load recent files list:"
)
+
"
\n
"
+
traceback
.
format_exc
())
if
abspath
in
recent_files
:
recent_files
.
remove
(
abspath
)
recent_files
.
insert
(
0
,
abspath
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment