Dima Kuznetsov has uploaded a new change for review.

Change subject: dmidecode: Filter out comments
......................................................................

dmidecode: Filter out comments

There is a version of dmidecode reported print #-prefixed comments, this
patch discards these lines.

Change-Id: I50493c5f77f59c5bdceac2a6e8223e8ccae75b09
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1098333
Signed-off-by: Dima Kuznetsov <dkuzn...@redhat.com>
---
M src/plugins/ovirt-host-deploy/vdsm/vdsmid.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy 
refs/changes/15/28615/1

diff --git a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py 
b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py
index bbfc692..2b4f714 100644
--- a/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py
+++ b/src/plugins/ovirt-host-deploy/vdsm/vdsmid.py
@@ -100,6 +100,8 @@
                 ),
                 raiseOnError=False
             )
+            # Filter out comments
+            stdout = [line for line in stdout if not line.startswith('#')]
             if rc != 0 or len(stdout) != 1:
                 self.logger.warning(_('Invalid dmidecode output'))
             elif stdout[0].startswith('Not '):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50493c5f77f59c5bdceac2a6e8223e8ccae75b09
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-host-deploy
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuzn...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to