[Ocfs2-tools-commits] manish commits r733 -
trunk/ocfs2console/ocfs2interface
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Mar 22 19:38:45 CST 2005
Author: manish
Date: 2005-03-22 19:38:43 -0600 (Tue, 22 Mar 2005)
New Revision: 733
Modified:
trunk/ocfs2console/ocfs2interface/clconfig.py
trunk/ocfs2console/ocfs2interface/format.py
trunk/ocfs2console/ocfs2interface/mount.py
trunk/ocfs2console/ocfs2interface/process.py
trunk/ocfs2console/ocfs2interface/tune.py
Log:
spin_now=False is a better default for Process
Modified: trunk/ocfs2console/ocfs2interface/clconfig.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/clconfig.py 2005-03-22 22:01:37 UTC (rev 732)
+++ trunk/ocfs2console/ocfs2interface/clconfig.py 2005-03-23 01:38:43 UTC (rev 733)
@@ -79,7 +79,7 @@
command = 'o2cb_ctl -I -t node -o'
o2cb_ctl = Process(command, 'Cluster Control', 'Querying nodes...',
- self.toplevel, spin_now=False)
+ self.toplevel)
success, output, k = o2cb_ctl.reap()
if not success:
@@ -169,7 +169,7 @@
'-i')
o2cb_ctl = Process(command, 'Cluster Control', 'Adding node...',
- self.toplevel, spin_now=False)
+ self.toplevel)
success, output, k = o2cb_ctl.reap()
if not success:
@@ -188,7 +188,7 @@
command = ('/etc/init.d/o2cb load')
o2cb = Process(command, 'Cluster Stack', 'Starting cluster stack...',
- parent, spin_now=False)
+ parent)
success, output, k = o2cb.reap()
if success:
@@ -216,13 +216,13 @@
command = 'o2cb_ctl -I -t cluster -n ocfs2 -o'
o2cb_ctl = Process(command, 'Cluster Control', 'Querying cluster...',
- parent, spin_now=False)
+ parent)
success, output, k = o2cb_ctl.reap()
if not success:
command = 'o2cb_ctl -C -n ocfs2 -t cluster -i'
o2cb_ctl = Process(command, 'Cluster Control', 'Creating cluster...',
- parent, spin_now=False)
+ parent)
success, output, k = o2cb_ctl.reap()
if not success:
@@ -249,7 +249,7 @@
command = ('/etc/init.d/o2cb online ocfs2')
o2cb = Process(command, 'Cluster Stack', 'Starting OCFS2 cluster...',
- parent, spin_now=False)
+ parent)
success, output, k = o2cb.reap()
if not success:
Modified: trunk/ocfs2console/ocfs2interface/format.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/format.py 2005-03-22 22:01:37 UTC (rev 732)
+++ trunk/ocfs2console/ocfs2interface/format.py 2005-03-23 01:38:43 UTC (rev 733)
@@ -122,7 +122,7 @@
dialog.destroy()
- mkfs = Process(command, 'Format', 'Formatting...', parent)
+ mkfs = Process(command, 'Format', 'Formatting...', parent, spin_now=True)
success, output, k = mkfs.reap()
if not success:
Modified: trunk/ocfs2console/ocfs2interface/mount.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/mount.py 2005-03-22 22:01:37 UTC (rev 732)
+++ trunk/ocfs2console/ocfs2interface/mount.py 2005-03-23 01:38:43 UTC (rev 733)
@@ -28,7 +28,7 @@
command = ('mount', '-t', 'ocfs2', device, mountpoint)
- p = Process(command, 'Mount', 'Mounting...', parent, spin_now=False)
+ p = Process(command, 'Mount', 'Mounting...', parent)
success, output, killed = p.reap()
if not success:
@@ -46,7 +46,7 @@
def unmount(parent, device, mountpoint):
command = ('umount', mountpoint)
- p = Process(command, 'Unmount', 'Unmounting...', parent, spin_now=False)
+ p = Process(command, 'Unmount', 'Unmounting...', parent)
success, output, killed = p.reap()
if not success:
Modified: trunk/ocfs2console/ocfs2interface/process.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/process.py 2005-03-22 22:01:37 UTC (rev 732)
+++ trunk/ocfs2console/ocfs2interface/process.py 2005-03-23 01:38:43 UTC (rev 733)
@@ -29,7 +29,7 @@
TIMEOUT = 10000
class Process:
- def __init__(self, command, title, desc, parent=None, spin_now=True):
+ def __init__(self, command, title, desc, parent=None, spin_now=False):
if isinstance(command, types.StringTypes):
if len(command.split(None, 1)) < 2:
command = (command,)
@@ -162,7 +162,8 @@
return True
def main():
- process = Process('echo Hello; sleep 10', 'Sleep', 'Sleeping')
+ process = Process('echo Hello; sleep 10', 'Sleep', 'Sleeping',
+ spin_now=True)
print process.reap()
if __name__ == '__main__':
Modified: trunk/ocfs2console/ocfs2interface/tune.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/tune.py 2005-03-22 22:01:37 UTC (rev 732)
+++ trunk/ocfs2console/ocfs2interface/tune.py 2005-03-23 01:38:43 UTC (rev 733)
@@ -117,7 +117,7 @@
dialog.destroy()
tunefs = Process(command, widget_type.title, widget_type.action + '...',
- parent)
+ parent, spin_now=True)
success, output, k = tunefs.reap()
if not success:
More information about the Ocfs2-tools-commits
mailing list