bitkeeper revision 1.1159.1.365 (418a0a91qNKrNOnOWtCM1nF1-HmNrA)

change readline to _readline to keep Twisted happy,
This commit is contained in:
iap10@tetris.cl.cam.ac.uk committed 2004-11-04 10:55:13 +00:00
1 parent 8550730aff
commit aae8f96153
4 files changed
+13 -4

No files matched your search

+3 -1
View File
@@ -15,6 +15,8 @@ from xen.sv.params import *
from twisted.internet import reactor
from twisted.web import static, server, script
from xen.util.ip import _readline, _readlines
class Daemon:
"""The xend daemon.
"""
@@ -57,7 +59,7 @@ class Daemon:
return 0
# Read the pid of the previous invocation and search active process list.
pid = open(PID_FILE, 'r').read()
lines = os.popen('ps ' + pid + ' 2>/dev/null').readlines()
lines = _readlines(os.popen('ps ' + pid + ' 2>/dev/null'))
for line in lines:
if re.search('^ *' + pid + '.+xensv', line):
if not kill:
+4 -1
View File
@@ -6,6 +6,9 @@ import sys
import string
from xen.xend import XendRoot
from xen.util.ip import _readline, _readlines
xroot = XendRoot.instance()
"""Where network control scripts live."""
@@ -37,6 +40,6 @@ def block(op, type, dets, script=None):
args = ' '.join(args)
out = os.popen(script + ' ' + args)
output = out.readline()
output = _readline(out)
out.close()
return string.rstrip(output)
+3 -1
View File
@@ -35,6 +35,8 @@ from xen.xend.server import SrvServer
from xen.xend import XendRoot
from xen.xend.XendLogging import log
from xen.util.ip import _readline, _readlines
import channel
import blkif
import netif
@@ -382,7 +384,7 @@ class Daemon:
"""
running = 0
if pid:
lines = os.popen('ps %d 2>/dev/null' % pid).readlines()
lines = _readlines(os.popen('ps %d 2>/dev/null' % pid))
exp = '^ *%d.+%s' % (pid, name)
for line in lines:
if re.search(exp, line):
+3 -1
View File
@@ -16,6 +16,8 @@ import channel
import controller
from messages import *
from xen.util.ip import _readline, _readlines
def expand_dev_name(name):
if re.match( '^/dev/', name ):
return name
@@ -25,7 +27,7 @@ def expand_dev_name(name):
def check_mounted(self, name):
mode = None
name = expand_dev_name(name)
lines = os.popen('mount 2>/dev/null').readlines()
lines = _readlines(os.popen('mount 2>/dev/null'))
exp = re.compile('^' + name + ' .*[\(,]r(?P<mode>[ow])[,\)]')
for line in lines:
pm = exp.match(line)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.