Adding subdirectories for remote commands to control ILO and DRAC cards over
[monitor.git] / mailer.py
index f8c27c0..c6a1f4e 100755 (executable)
--- a/mailer.py
+++ b/mailer.py
@@ -4,7 +4,7 @@
 #
 # Faiyaz Ahmed <faiyaza@cs.princeton.edu>
 #
-# $Id: mailer.py,v 1.9 2007/07/03 19:57:16 soltesz Exp $
+# $Id: mailer.py,v 1.10 2007/08/08 13:28:06 soltesz Exp $
 from emailTxt import *
 import smtplib
 from config import config
@@ -27,7 +27,7 @@ def reformat_for_rt(text):
                
 
 def _setupRTenvironment():
-       os.environ['PATH'] = os.environ['PATH'] + ":/home/soltesz/rpm/opt/rt3/bin/"
+       os.environ['PATH'] = os.environ['PATH'] + ":/home/soltesz/local/bin/"
        os.environ['RTSERVER'] = "https://rt.planet-lab.org/"
        os.environ['RTUSER']   = "monitor"
        os.environ['RTPASSWD'] = "ssorcmor"
@@ -54,6 +54,7 @@ def setAdminCCViaRT(ticket_id, to):
                # Success
                pass
        else:
+               print "VALUE:", value
                print "ERROR: RT failed to update AdminCC for ticket %s" % ticket_id
 
        return
@@ -76,6 +77,7 @@ def setSubjectViaRT(ticket_id, subject):
                # Success
                pass
        else:
+               print "VALUE:", value
                print "ERROR: RT failed to update subject for ticket %s" % ticket_id
 
        return
@@ -129,9 +131,10 @@ def closeTicketViaRT(ticket_id, comment):
                        # Success!!
                        pass
                else:
+                       print "VALUE: ", value
                        # Failed!!
-                       print "FAILED to resolve Ticket %d" % ticket_id
-                       print "FAILED to resolve Ticket %d" % i_ticket_id
+                       print "FAILED to resolve Ticket %s" % ticket_id
+                       print "FAILED to resolve Ticket %s" % i_ticket_id
 
        return