Change in vdsm[master]: Add some base functions to vdsm-tool

ewoud at kohlvanwijngaarden.nl ewoud at kohlvanwijngaarden.nl
Thu Jun 14 12:26:32 UTC 2012


Ewoud Kohl van Wijngaarden has posted comments on this change.

Change subject: Add some base functions to vdsm-tool
......................................................................


Patch Set 5: I would prefer that you didn't submit this

(2 inline comments)

Now I have another question ;)

....................................................
File vdsm-tool/base.py
Line 72: def get_config_item(file, section, item, default=None):
You can call it with a default:

 get_config_item('config.ini', 'database', 'host', 'localhost')

If the host item isn't available in the section database you will get 'localhost'. If you didn't give it a default it will return None.

Line 76:     config.read(file)
I am wondering if you need to catch any exceptions here though.

--
To view, visit http://gerrit.ovirt.org/5264
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id1be737adce28e9ca532aa454e7f0a060947589e
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Wenyi Gao <wenyi at linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud at kohlvanwijngaarden.nl>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Wenyi Gao <wenyi at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list