From 73e9490344413d4371dd26a311634a30366cd178 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 20 Sep 2011 12:43:13 +0200 Subject: [PATCH] simpler yet --- system/Substrate.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/system/Substrate.py b/system/Substrate.py index ad50129..7fe0019 100644 --- a/system/Substrate.py +++ b/system/Substrate.py @@ -303,7 +303,6 @@ class BuildBox (Box): return '*undef* uptime' # inspect box and find currently running builds - matcher_exclude=re.compile(".*builds\.sh.*") matcher=re.compile("\s*(?P[0-9]+).*-[bo]\s+(?P[^\s]+)(\s|\Z)") def sense(self,reboot=False,verbose=True): if reboot: @@ -313,13 +312,12 @@ class BuildBox (Box): command=['uptime'] self._uptime=self.backquote_ssh(command,trash_err=True).strip() if not self._uptime: self._uptime='unreachable' - pids=self.backquote_ssh(['pgrep','build'],trash_err=True) + pids=self.backquote_ssh(['pgrep','vbuild'],trash_err=True) if not pids: return command=['ps','-o','pid,command'] + [ pid for pid in pids.split("\n") if pid] ps_lines=self.backquote_ssh (command).split('\n') for line in ps_lines: if not line.strip() or line.find('PID')>=0: continue - if BuildBox.matcher_exclude.match(line): continue m=BuildBox.matcher.match(line) if m: date=time.strftime('%Y-%m-%d',time.localtime(time.time())) -- 2.43.0