Use os.path.basename() instead of string splitting.
Fixes bug 886268. Change-Id: I16e05f4ead55c75f29217072d106421fdc7de201
This commit is contained in:
parent
fe56d3c6ba
commit
541f747f05
|
@ -61,7 +61,7 @@ class Mount(object):
|
|||
assert(os.path.exists(self.device))
|
||||
|
||||
if self.partition:
|
||||
map_path = '/dev/mapper/%sp%s' % (self.device.split('/')[-1],
|
||||
map_path = '/dev/mapper/%sp%s' % (os.path.basename(self.device),
|
||||
self.partition)
|
||||
assert(not os.path.exists(map_path))
|
||||
|
||||
|
|
Loading…
Reference in New Issue