cas | 8 ++++----
lib/cas/db.py | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 4070b11a0c51052cda821fa709d00781f6fe4dda
Author: adam stokes <ajs(a)redhat.com>
Date: Mon Apr 27 09:39:16 2009 -0400
- fix output redirect (Flavio Leitner)
- fix a sql like match in getTimeStampDebug (Flavio Leitner)
- fix incorrect sql statement in addServer (Flavio Leitner)
diff --git a/cas b/cas
index e380203..3245adb 100755
--- a/cas
+++ b/cas
@@ -228,8 +228,8 @@ class CasApplication(object):
CRASH_32)
self.casLog.info("Current machine suitable for processing 32 bit core,
"\
"running crash.")
- cmd = "cd " + os.path.join(self.storagePath) + " &&
./crash -i crash.in > crash.out"
- cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE)
+ cmd = "./crash -i crash.in > crash.out"
+ cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE, shell=True)
cmdData = cmdPipe.communicate()
# pull status code to verify crash even ran to completeness
sts, out, err = (cmdPipe.returncode, cmdData[0].strip(),
@@ -242,8 +242,8 @@ class CasApplication(object):
casProcessMachine = platform.uname()[1]
# The machine is suitable for processing the core through crash.
self.casLog.info("Current machine suitable for processing core, running
crash.")
- cmd = "cd " + os.path.join(self.storagePath) + " &&
./crash -i crash.in > crash.out"
- cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE)
+ cmd = "./crash -i crash.in > crash.out"
+ cmdPipe = Popen([cmd], stdout=PIPE, stderr=PIPE, shell=True)
cmdData = cmdPipe.communicate()
# pull status code to verify crash even ran to completeness
sts, out, err = (cmdPipe.returncode, cmdData[0].strip(),
diff --git a/lib/cas/db.py b/lib/cas/db.py
index 9826dd9..c76021f 100644
--- a/lib/cas/db.py
+++ b/lib/cas/db.py
@@ -87,7 +87,7 @@ class CasStorage(object):
values = (timestamp,)
self.cursor.execute('''SELECT rpm,debugpath
FROM debuginfo, timestamp
- where timestamp LIKE '%"%s"%'''
% values)
+ where timestamp LIKE
'"%%%s%%"''' % values)
return self.cursor.fetchone()
# JOB METHODS
@@ -118,7 +118,7 @@ class CasStorage(object):
def addServer(self, hostname, arch):
""" add server/arch to db """
values = (hostname, arch)
- self.cursor.execute('select * from server where hostname"%s"' %
(hostname,))
+ self.cursor.execute('select * from server where hostname="%s"'
% (hostname,))
if not self.cursor.fetchone():
self.cursor.execute('''INSERT into server (hostname, arch)
values ("%s","%s")''' % values)
Show replies by date