Code review comment for lp:~joetalbott/utah/add_product_uuid

Revision history for this message
Javier Collado (javier.collado) wrote :

To read files I like to use a context manager to guarantee that the file is closed:

with open(filename) as f:
    product_uuid = f.read().strip()

Besides this, I'm not sure about the expected UUID format, but maybe using a regular
expression is a good idea.

Finally, when is the IOError expected to happen? If it's related to permissions,
then checking the permissions before opening the file might be clearer and explicit.

« Back to merge proposal