Review Request 219: Simplify error handling of FormatProvider.get_format_for_id and get_format_for_name.

Jan Synacek reviewboard at gallagherhome.com
Tue Apr 16 13:11:22 UTC 2013


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

Ship it!


Ship It!

- Jan Synacek


On April 16, 2013, 3:08 p.m., Jan Safranek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard-openlmi.rhcloud.com/r/219/
> -----------------------------------------------------------
> 
> (Updated April 16, 2013, 3:08 p.m.)
> 
> 
> Review request for OpenLMI Developers.
> 
> 
> 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 
> 
> Diff: http://reviewboard-openlmi.rhcloud.com/r/219/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jan Safranek
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/openlmi-devel/attachments/20130416/c1ea936f/attachment.html>


More information about the openlmi-devel mailing list