Revision 1c5027d6 lib/backend.py
b/lib/backend.py | ||
---|---|---|
1916 | 1916 |
|
1917 | 1917 |
""" |
1918 | 1918 |
try: |
1919 |
result = _RecursiveAssembleBD(disk, owner, as_primary)
|
|
1920 |
if isinstance(result, bdev.BlockDev):
|
|
1921 |
# pylint: disable=E1103
|
|
1922 |
result = result.dev_path
|
|
1919 |
device = _RecursiveAssembleBD(disk, owner, as_primary)
|
|
1920 |
if isinstance(device, bdev.BlockDev):
|
|
1921 |
dev_path = device.dev_path
|
|
1922 |
link_name = None
|
|
1923 | 1923 |
if as_primary: |
1924 |
_SymlinkBlockDev(owner, result, idx)
|
|
1924 |
link_name = _SymlinkBlockDev(owner, dev_path, idx)
|
|
1925 | 1925 |
except errors.BlockDeviceError, err: |
1926 | 1926 |
_Fail("Error while assembling disk: %s", err, exc=True) |
1927 | 1927 |
except OSError, err: |
1928 | 1928 |
_Fail("Error while symlinking disk: %s", err, exc=True) |
1929 | 1929 |
|
1930 |
return result
|
|
1930 |
return dev_path, link_name
|
|
1931 | 1931 |
|
1932 | 1932 |
|
1933 | 1933 |
def BlockdevShutdown(disk): |
Also available in: Unified diff