This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/219/

Ship it!

Ship It!

- Jan


On April 16th, 2013, 3:08 p.m. CEST, Jan Safranek wrote:

Review request for OpenLMI Developers.
By Jan Safranek.

Updated April 16, 2013, 3:08 p.m.

Repository: openlmi-storage

Description

Simplify error handling of FormatProvider.get_format_for_id and get_format_for_name.

With tuple (None, None) returned, following code can be used for error
handling:

(device, fmt) = fmtprovider.get_format_for_name(...)

if not device:
    raise ...
 
With None, the unpacking would not be possible.

Also extend the documentation to explicitly state which device is returned.

Diffs

  • src/openlmi/storage/FormatProvider.py (611e9012ea9fbecae788cb1bfa1c635ff4f16c33)

View Diff