[mentors-ops] r261 - importer/python
Fri Sep 22 17:21:37 CEST 2006
Author:
Date: 2006-09-22 17:21:36 +0200 (Fri, 22 Sep 2006)
New Revision: 261
Modified:
importer/python/importy.py
Log:
Sending an email to the people listed as "Uploaders:" in the *.dsc file.
Modified: importer/python/importy.py
===================================================================
--- importer/python/importy.py 2006-09-22 15:17:54 UTC (rev 260)
+++ importer/python/importy.py 2006-09-22 15:21:36 UTC (rev 261)
@@ -547,22 +547,6 @@
'logfile':Importer.logfilename # name of the log file for this import run
}
-# sqlparams = (
-# maintainer_row['id'], # user id
-# dsc_fields['Source'], # source package name
-# pkg_url, # URL in the repository where the package is stored
-# changes_fields['Description'], # description
-# dsc_fields['Version'], # version
-# pkg_section, # subsection
-# pkg_priority, # priority
-# "\n".join(lintian_report),
-# lintian_warnings, # number of lintian warnings
-# lintian_errors, # number of lintian errors
-# closes_bugs, # closed bugs
-# "\n---\n".join(import_warnings), # importer warnings
-# Importer.logfilename # name of the log file for this import run
-# )
-
log.debug("insert-db: SQL replace query for new package: %s" % sql)
log.debug("insert-db: SQL parameters for this query: %s" % \
str(sqlparams))
@@ -594,10 +578,19 @@
# FIXME: mail_info can be empty if the package is okay - looks ugly in the
# mail
+ logging.info('main: Sending mail to maintainer')
Importer.sendMail(template="success", info=mail_info,
cgipath=Config.WebBaseUrl+Config.WebCgiPath,
url=Config.WebPoolUrl+'/'+pkg_url)
+ # Send an email to the people mentioned as "Uploaders:" in the .dsc file
+ if 'Uploaders' in dsc_fields:
+ logging.info('main: Sending mail to uploaders')
+ Importer.sendMail(sendto=dsc_fields['Uploaders'],
+ template="success-uploaders", info=mail_info,
+ cgipath=Config.WebBaseUrl+Config.WebCgiPath,
+ url=Config.WebPoolUrl+'/'+pkg_url)
+
log.info("main: Processing the upload took %.1f seconds." % (
time.time() - start_time))
@@ -611,9 +604,6 @@
# Wipe away the changes file so we don't hang in a loop
# and try to import the package time and again.
def removeChanges(changes_filename):
- # Get the options/settings from the global context
- # TODO: move it to a quarantine directory for further analysis
-
# Only remove the changes file if it still exists
if os.path.exists(changes_filename):
if options.simulate:
More information about the mentors-ops
mailing list