Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
899f5736
authored
Jan 26, 2021
by
Máhonfai Bálint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors with unlinking
parent
2b4ce60c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
disk.py
+6
-3
No files found.
disk.py
View file @
899f5736
...
...
@@ -301,17 +301,20 @@ class Disk(object):
self
.
get_path
()]
subprocess
.
check_output
(
cmdline
)
except
AbortException
:
os
.
unlink
(
downloaded_file
)
if
os
.
path
.
exists
(
downloaded_file
):
os
.
unlink
(
downloaded_file
)
if
os
.
path
.
exists
(
self
.
get_path
()):
os
.
unlink
(
self
.
get_path
())
logger
.
info
(
"Import of disk
%
s aborted"
%
self
.
name
)
except
:
os
.
unlink
(
downloaded_file
)
if
os
.
path
.
exists
(
downloaded_file
):
os
.
unlink
(
downloaded_file
)
if
os
.
path
.
exists
(
self
.
get_path
()):
os
.
unlink
(
self
.
get_path
())
raise
else
:
os
.
unlink
(
downloaded_file
)
if
os
.
path
.
exists
(
downloaded_file
):
os
.
unlink
(
downloaded_file
)
if
not
self
.
check_valid_image
():
os
.
unlink
(
self
.
get_path
())
...
...
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