Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
e042d6bb
Commit
e042d6bb
authored
Dec 01, 2017
by
Paul McCarthy
🚵
Browse files
Pickle functions sometimes raise EOFError
parent
73b415bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/utils/settings.py
View file @
e042d6bb
...
...
@@ -372,7 +372,7 @@ class Settings(object):
try
:
with
open
(
configFile
,
'rb'
)
as
f
:
return
pickle
.
load
(
f
)
except
(
IOError
,
pickle
.
UnpicklingError
):
except
(
IOError
,
pickle
.
UnpicklingError
,
EOFError
):
log
.
debug
(
'Unable to load stored {} configuration file '
'{}'
.
format
(
self
.
__configID
,
configFile
),
exc_info
=
True
)
...
...
@@ -391,7 +391,7 @@ class Settings(object):
try
:
with
open
(
configFile
,
'wb'
)
as
f
:
pickle
.
dump
(
config
,
f
)
except
(
IOError
,
pickle
.
PicklingError
):
except
(
IOError
,
pickle
.
PicklingError
,
EOFError
):
log
.
warning
(
'Unable to save {} configuration file '
'{}'
.
format
(
self
.
__configID
,
configFile
),
exc_info
=
True
)
Write
Preview
Supports
Markdown
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