[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] /srv/bzr/emacs/elpa r216: Add debug option, to not send mai
From: |
Glenn Morris |
Subject: |
[ELPA-diffs] /srv/bzr/emacs/elpa r216: Add debug option, to not send mail. |
Date: |
Tue, 22 May 2012 00:30:14 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 216
committer: Glenn Morris <address@hidden>
branch nick: elpa
timestamp: Tue 2012-05-22 00:30:14 -0700
message:
Add debug option, to not send mail.
Add packagedir argument, to get the path to packages/.
modified:
admin/forward-diffs.py
=== modified file 'admin/forward-diffs.py'
--- a/admin/forward-diffs.py 2012-05-22 07:22:25 +0000
+++ b/admin/forward-diffs.py 2012-05-22 07:30:14 +0000
@@ -53,7 +53,7 @@
import os
usage="""usage: %prog <-m maintfile> <-l logfile> <-s sender>
- [-o overmaintfile] [--sendmail]
+ <-p /path/to/packages> [-o overmaintfile] [--sendmail] [--debug]
Take a GNU ELPA diff on stdin, and forward it to the maintainer(s)."""
parser = optparse.OptionParser()
@@ -64,10 +64,15 @@
help="file to append output to")
parser.add_option( "-o", dest="overmaintfile", default=None,
help="override file listing packages and maintainers")
+parser.add_option( "-p", dest="packagedir", default=None,
+ help="path to packages directory")
parser.add_option( "-s", dest="sender", default=None,
help="sender address for forwards")
parser.add_option( "--sendmail", dest="sendmail", default=False,
action="store_true", help="use sendmail rather than smtp")
+parser.add_option( "--debug", dest="debug", default=False,
+ action="store_true", help="debug only, do not send mail")
+
( opts, args ) = parser.parse_args()
@@ -77,10 +82,18 @@
if not opts.maintfile:
parser.error('No maintfile specified')
+if not opts.packagedir:
+ parser.error('No packagedir specified')
+
if not opts.sender:
parser.error('No sender specified')
+if not os.path.isdir(opts.packagedir):
+ sys.stderr.write('Error reading packagedir\n')
+ sys.exit(1)
+
+
try:
lfile = open( opts.logfile, 'a' )
except Exception as err:
@@ -206,6 +219,9 @@
if opts.sendmail else 'smtp') )
+ if debug: continue
+
+
if opts.sendmail:
s = os.popen("/usr/sbin/sendmail -i -f %s %s" %
(opts.sender, maint), "w")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ELPA-diffs] /srv/bzr/emacs/elpa r216: Add debug option, to not send mail.,
Glenn Morris <=