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
1bf2e9c2
authored
Sep 24, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
0b339013
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
disk.py
+4
-6
No files found.
disk.py
View file @
1bf2e9c2
...
...
@@ -90,15 +90,13 @@ class Disk(object):
size
=
disk_info
.
get
(
'virtual-size'
)
actual_size
=
disk_info
.
get
(
'actual-size'
)
# Check if disk has base (backing-image)
# Based on backing image determine wether snapshot ot normal image
base_path
=
disk_info
.
get
(
'backing-filename'
)
if
base_path
:
base_name
=
os
.
path
.
basename
(
base_path
)
else
:
base_name
=
None
# Based on backing image determine weather snapshot ot normal image
if
base_name
:
type
=
'snapshot'
else
:
base_name
=
None
type
=
'normal'
return
Disk
(
dir
,
name
,
format
,
type
,
size
,
base_name
,
actual_size
)
...
...
@@ -292,14 +290,14 @@ class Disk(object):
sleep
(
1
)
except
AbortException
:
proc
.
terminate
()
logger
.
warning
(
"Aborted merge job removing
%
s"
,
logger
.
warning
(
"Aborted merge job
,
removing
%
s"
,
new_disk
.
get_path
())
os
.
unlink
(
new_disk
.
get_path
())
except
:
if
proc
:
proc
.
terminate
()
logger
.
exception
(
"Unknown error occured removing
%
s "
,
logger
.
exception
(
"Unknown error occured
,
removing
%
s "
,
new_disk
.
get_path
())
os
.
unlink
(
new_disk
.
get_path
())
raise
...
...
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