Bug 1126765 - lvm.create_vg() throws a traceback
Summary: lvm.create_vg() throws a traceback
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openlmi-storage
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Jan Safranek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-05 08:40 UTC by Jan Safranek
Modified: 2014-11-04 15:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-04 15:15:07 UTC


Attachments (Terms of Use)

Description Jan Safranek 2014-08-05 08:40:26 UTC
Following script fails with a traceback on clean Fedora 20 installation:

c = connect("localhost")
ns = c.root.cimv2
import lmi.scripts.storage.lvm as lvm
lvm.create_vg(ns, ['/dev/vdb1'], 'testVg1')

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/lmi/scripts/storage/lvm.py", line 201, in create_vg
    % (values.value_name(ret),))
  File "/usr/lib/python2.7/site-packages/lmi/shell/LMIConstantValues.py", line 137, in value_name
    return self._value_map_inv[value]
KeyError: None


Version-Release number of selected component (if applicable):
openlmi-scripts-storage-0.3.0-1.fc20.noarch


The reason is that 'ret' is None, while 'err' is set.

Comment 1 Jan Safranek 2014-08-05 08:51:57 UTC
Patch sent upstream: https://github.com/openlmi/openlmi-scripts/pull/95

Comment 2 Jan Safranek 2014-11-04 15:15:07 UTC
Fixed in 0.3.0 (and also probably earlier, sorry for not updating the bug).


Note You need to log in before you can comment on or make changes to this bug.