[node-patches] Change in ovirt-node[master]: Allowing code to be run from jenkins where there is no termi...
fabiand at redhat.com
fabiand at redhat.com
Tue Jan 6 11:29:15 UTC 2015
Fabian Deutsch has posted comments on this change.
Change subject: Allowing code to be run from jenkins where there is no terminal that runs the job.
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/36415/2/tools/edit-node
File tools/edit-node:
Line 153:
Line 154: self.skip_minimize = False
Line 155: """Controls whether an image minimizing snapshot should be created."""
Line 156:
Line 157: self._builder = os.environ['LOGNAME']
please use os.environ.get() (which should also work if LOGNAME is not set).
Try:
In [1]: import os
In [2]: os.environ["BAR"]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-2-ec3751371af5> in <module>()
----> 1 os.environ["BAR"]
/usr/lib64/python2.7/UserDict.pyc in __getitem__(self, key)
21 if hasattr(self.__class__, "__missing__"):
22 return self.__class__.__missing__(self, key)
---> 23 raise KeyError(key)
24 def __setitem__(self, key, item): self.data[key] = item
25 def __delitem__(self, key): del self.data[key]
KeyError: 'BAR'
Line 158: """The name of the Remix builder for _branding.
Line 159: Default = os.getlogin()"""
Line 160:
Line 161: self._isofstype = "iso9660"
--
To view, visit http://gerrit.ovirt.org/36415
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie25e0827a51df92dec58c7d6f052663bcea9c297
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Anatoly Litovsky <tlitovsk at redhat.com>
Gerrit-Reviewer: Anatoly Litovsky <tlitovsk at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the node-patches
mailing list