[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r18721: {projects} Update GetTor properly to catch an exception where we may or (projects/gettor)



Author: ioerror
Date: 2009-02-28 09:20:29 -0500 (Sat, 28 Feb 2009)
New Revision: 18721

Modified:
   projects/gettor/GetTor.py
Log:
Update GetTor properly to catch an exception where we may or may not send the mail properly. Take that gmail.


Modified: projects/gettor/GetTor.py
===================================================================
--- projects/gettor/GetTor.py	2009-02-28 13:58:27 UTC (rev 18720)
+++ projects/gettor/GetTor.py	2009-02-28 14:20:29 UTC (rev 18721)
@@ -214,7 +214,12 @@
         package = rmail.getPackage()
         if package != None:
             log.info(_("Package: %s selected.") % str(package))
-            resp.sendPackage(srcEmail, replyTo, packageList[package])  
+            status = resp.sendPackage(srcEmail, replyTo, packageList[package])
+            if status != True:
+                log.info(_("Failed at attempt to send package: %s") % str(package))
+                return False
+            else:
+                log.info(_("Package sent: %s") % str(package))
         else:
             resp.sendPackageHelp(packageList, srcEmail, replyTo)
             log.info(_("We issued some help about proper email formatting."))