[node-patches] Change in ovirt-node[master]: Stop doing circular imports in process.check_output
rbarry at redhat.com
rbarry at redhat.com
Thu Jun 27 20:42:48 UTC 2013
Ryan Barry has uploaded a new change for review.
Change subject: Stop doing circular imports in process.check_output
......................................................................
Stop doing circular imports in process.check_output
ovirt.node.utils.system requires ovirt.node.utils.process.
Circular imports make process unusable from a python shell. Delay
importing system until we actually need it.
Change-Id: Ic779d49b0c1e46f416a5c62fc707a10bb5fb9baf
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
A src/ovirt-crash.log
M src/ovirt/node/utils/process.py
2 files changed, 90 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/11/16211/1
diff --git a/src/ovirt-crash.log b/src/ovirt-crash.log
new file mode 100644
index 0000000..3fb7aa9
--- /dev/null
+++ b/src/ovirt-crash.log
@@ -0,0 +1,89 @@
+7[?47h[?1000h[?1002h)0[?25l[0;39;49m[H[1;1H[0;1;37;44m[K[2;1H[0;1;37;44m oVirt None-None[K[3;1H[0;1;37;44m[K[4;1H[0;30;47m┌───────────────────────────────────────┐[0;39;47m [0;30;1;47m [0;39;47m [K[5;1H[0;30;47m│[0;39;44mStatus [0;30;47m│[0;39;47m [0;30;1;47m System Information [0;39;47m [K[6;1H[0;30;47m│[0;30;47mNetwork [0;30;47m│[0;39;47m [0;30;1;47m [0;39;47m [K[7;1H[0;30;47m│[0;30;4!
7mSecurity [0;30;47m│[0;39;47m [0;1;30;47mStatus: [0;30;47mNo virtualization hardware was detected on this system [0;39;47m [K[8;1H[0;30;47m│[0;30;47mKeyboard [0;30;47m│[0;39;47m [0;30;47m [0;39;47m [K[9;1H[0;30;47m│[0;30;47mSNMP [0;30;47m│[0;39;47m [0;1;30;47mNetworking: [0;30;47mConnected eth0 [0;39;47m [K[10;1H[0;30;47m│[0;30;47mCIM [0;30;47m│[0;39;47m [0;39;47m [0;30;47mIPv4: 192.168.0.165 !
[0;39;47m [K[11;1H[0;30;47m│[0;30;47mLogging [0;30;47m│[0;39;47m [0;39;47m [0;30;47mIPv6: fe80::21a:4aff:fea8:74 [0;39;47m [K[12;1H[0;30;47m│[0;30;47mKdump [0;30;47m│[0;39;47m [0;30;47m [0;39;47m [K[13;1H[0;30;47m│[0;30;47mRemote Storage [0;30;47m│[0;39;47m [0;1;30;47mLogs: [0;30;47mLocal Only [0;39;47m [K[14;1H[0;30;47m│[0;30;47mMonitoring [0;30;47m│[0;39;47m [0;30;47m !
[0;39;47m [K[15;1H[0;30;47m│[0;30;47mDiagnostics [0;30;47m│[0;39;47m [0;1;30;47mRunning VMs: [0;30;47m0 [0;39;47m [K[16;1H[0;30;47m│[0;30;47mPerformance [0;30;47m│[0;39;47m [0;30;47m [0;39;47m [K[17;1H[0;30;47m│[0;30;47mPuppet [0;30;47m│[0;39;47m [0;30;47mPress F8 for support menu [0;39;47m [K[18;1H[0;30;47m│[0;30;47mPlugins [0;30;47m│[0;39;47m [0;30;47m !
[0;39;47m [K[19;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;34;47m< View Host Key >[0;39;47m [0;34;47m< View CPU Details >[0;39;47m [0;39;47m [K[20;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;34;47m< Lock >[0;39;47m [0;34;47m< Log Off >[0;39;47m [0;34;47m< Restart >[0;39;47m [0;34;47m< Power Off >[0;39;47m [0;39;47m [K[21;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[22;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;!
39;47m [0;39;47m [K[23;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[24;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[25;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[26;1H[0;30;47m│[0;30;47m !
[0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[27;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[28;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[29;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[30;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m!
[0;39;47m [0;39;47m [K[31;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[32;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[33;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[34;1H[0;30;47m│[0;30;47m !
[0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[35;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[36;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[37;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[38;1H[0;30;47m│[0;30;47m [0;30;47m│!
[0;39;47m [0;39;47m [0;39;47m [K[39;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[40;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[41;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[42;1H[0;30;47m│[0;30;47m !
[0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[43;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[44;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[45;1H[0;30;47m│[0;30;47m [0;30;47m│[0;39;47m [0;39;47m [0;39;47m [K[46;1H[0;30;47m│[0;30;47m [0;3!
0;47m│[0;39;47m [0;39;47m [0;39;47m [K[47;1H[0;30;47m└───────────────────────────────────────┘[0;39;47m [0;39;47m [0;39;47m [K[48;1H[0;39;47mPress esc to quit.[K[0;39;49m[?1002l[?1000l[?25h[?47l8
+[?25hTraceback (most recent call last):
+ File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
+ "__main__", fname, loader, pkg_name)
+ File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
+ exec code in run_globals
+ File "/home/ryan/ovirt-node/src/ovirt/node/setup/__main__.py", line 31, in <module>
+ app.run()
+ File "ovirt/node/app.py", line 303, in run
+ self.ui.run()
+ File "ovirt/node/ui/urwid_builder.py", line 473, in run
+ self.__loop.run()
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/main_loop.py", line 272, in run
+ self.screen.run_wrapper(self._run)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/raw_display.py", line 242, in run_wrapper
+ return fn()
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/main_loop.py", line 337, in _run
+ self.event_loop.run()
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/main_loop.py", line 708, in run
+ self._loop()
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/main_loop.py", line 778, in _loop
+ self._entering_idle()
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/main_loop.py", line 697, in _entering_idle
+ callback()
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/main_loop.py", line 549, in entering_idle
+ self.draw_screen()
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/main_loop.py", line 563, in draw_screen
+ canvas = self._topmost_widget.render(self.screen_size, focus=True)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/decoration.py", line 225, in render
+ canv = self._original_widget.render(size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 1058, in render
+ focus and self.focus_part == 'body')
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 1499, in render
+ canv = w.render((maxcol, rows), focus=focus and item_focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 2055, in render
+ focus = focus and self.focus_position == i)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 1058, in render
+ focus and self.focus_part == 'body')
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/decoration.py", line 564, in render
+ canv = self._original_widget.render((maxcol,)+size[1:], focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 1499, in render
+ canv = w.render((maxcol, rows), focus=focus and item_focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 1751, in render
+ canv = get_delegate(self).render(size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 1499, in render
+ canv = w.render((maxcol, rows), focus=focus and item_focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/decoration.py", line 564, in render
+ canv = self._original_widget.render((maxcol,)+size[1:], focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 1058, in render
+ focus and self.focus_part == 'body')
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/decoration.py", line 225, in render
+ canv = self._original_widget.render(size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 1493, in render
+ canv = w.render((maxcol,), focus=focus and item_focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/container.py", line 1493, in render
+ canv = w.render((maxcol,), focus=focus and item_focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
+ canv = fn(self, size, focus=focus)
+ File "/usr/lib/python2.6/site-packages/urwid-1.1.1-py2.6-linux-x86_64.egg/urwid/widget.py", line 788, in render
+ maxcol, maxrow = size
+ValueError: need more than 1 value to unpack
diff --git a/src/ovirt/node/utils/process.py b/src/ovirt/node/utils/process.py
index 2f0cb17..27e96da 100644
--- a/src/ovirt/node/utils/process.py
+++ b/src/ovirt/node/utils/process.py
@@ -19,7 +19,6 @@
# MA 02110-1301, USA. A copy of the GNU General Public License is
# also available at http://www.gnu.org/copyleft/gpl.html.
from subprocess import STDOUT, PIPE
-import ovirt.node.utils
import logging
import subprocess
import sys
@@ -72,6 +71,7 @@
def check_output(*args, **kwargs):
"""subprocess.check_output wrapper to not leak file descriptors
"""
+ import ovirt.node.utils.system
kwargs = __update_kwargs(kwargs)
LOGGER.debug("Checking output with: %s %s" % (args, kwargs))
if ovirt.node.utils.system.is_python_2_6():
--
To view, visit http://gerrit.ovirt.org/16211
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic779d49b0c1e46f416a5c62fc707a10bb5fb9baf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list