cas | 14 ++++++++++++--
cas.spec | 2 +-
lib/cas/util.py | 2 +-
version | 2 +-
4 files changed, 15 insertions(+), 5 deletions(-)
New commits:
commit aa7943b13ae2c90742cfaacd3581a45eb93c5a3a
Author: Adam Stokes <adam(a)conans.battleaxe>
Date: Mon Dec 15 08:14:14 2008 -0500
- catch smtplib socket error since no exception is provided
(that i could find at least)
- still working out how to handle logging properly
diff --git a/cas b/cas
index 96510b3..307bc04 100755
--- a/cas
+++ b/cas
@@ -78,7 +78,9 @@ class TimestampHandler(object):
self.tool = CoreBase()
def run(self):
- cprint("Running timestamp")
+ # dig through the buildstamp database and attempt to match it with the
+ # one found in the core
+ cprint("Running timestamp on %s" % (self.corefile,))
rpmDB = self.util.load(RPMS)
try:
coreTimestamp = self.tool.timestamp(self.corefile)
@@ -101,6 +103,8 @@ class CasApplication(object):
self.rpmTool = RPMBase()
def parse_options(self, args):
+ # build option - arguement list in the form of
+ # cas -i <id> -f <filename> -m user(a)example.com
parser = optparse.OptionParser(usage="cas [opts] args")
parser.add_option("-i","--identifier",
dest="identifier",
help="Unique ID for core")
@@ -213,7 +217,13 @@ class CasApplication(object):
crashOutFH = open(crashOutFile,'r')
msg += crashOutFH.read()
crashOutFH.close()
- mailServer = smtplib.SMTP(SMTPHOST)
+ try:
+ # for some reason smtplib doesn't have proper exception handling
+ # for name or service not known :(
+ mailServer = smtplib.SMTP(SMTPHOST)
+ except:
+ dprint("Unable to connect to mail server: %s, no email " \
+ "results sent." % (SMTPHOST,))
mailServer.set_debuglevel(0)
mailServer.sendmail(self.email,self.email,msg)
mailServer.quit()
diff --git a/cas.spec b/cas.spec
index b7ee24a..a516164 100644
--- a/cas.spec
+++ b/cas.spec
@@ -40,7 +40,7 @@ rm -rf ${RPM_BUILD_ROOT}
%{python_sitelib}/*
%{_mandir}/man1/cas.1.gz
%{_mandir}/man1/cas-admin.1.gz
-%doc LICENSE README
+%doc LICENSE README PKG-INFO
%changelog
* Mon Dec 15 2008 Adam Stokes <ajs at redhat dot com> - 0.13-94
diff --git a/lib/cas/util.py b/lib/cas/util.py
index 97a02b8..8086993 100755
--- a/lib/cas/util.py
+++ b/lib/cas/util.py
@@ -36,7 +36,7 @@ fh.setFormatter(fh_fmt)
def dprint(msg, debug=True):
if debug:
log.setLevel(logging.DEBUG)
- log.debug(msg)
+ log.debug("[.cas.][debug] :: " +msg)
def sprint(msg):
""" function to print status messages
diff --git a/version b/version
index 281a13a..88e3999 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-0.13 95
+0.13 97
Show replies by date