Code review comment for lp:~fcorrea/landscape-client/add-vminfo-to-computer-info-message

Revision history for this message
Thomas Herve (therve) wrote :

Looks good!

[6]
+ elif exists(join_root_path("proc/cpuinfo")):
+ with open(join_root_path("proc/cpuinfo")) as cpuinfo:
+ if "QEMU Virtual CPU" in cpuinfo.read():
+ virt_info = "kvm"

You don't need to check for the existence of cpuinfo (it should always be there). You can't use "with" because we're still supporting python 2.5 in the client. You could use a future import, but I'd rather see you use try/finally here.

+1!

review: Approve

« Back to merge proposal