def notify(self, ids, committer): '''tell bugzilla to send mail.''' self.ui.status(_('telling bugzilla to send mail:\n')) (user, userid) = self.get_bugzilla_user(committer) for id in ids: self.ui.status(_(' bug %s\n') % id) cmdfmt = self.ui.config('bugzilla', 'notify', self.default_notify) bzdir = self.ui.config('bugzilla', 'bzdir', '/var/www/html/bugzilla') try: # Backwards-compatible with old notify string, which # took one string. This will throw with a new format # string. cmd = cmdfmt % id except TypeError: cmd = cmdfmt % {'bzdir': bzdir, 'id': id, 'user': user} self.ui.note(_('running notify command %s\n') % cmd) fp = util.popen('(%s) 2>&1' % cmd) out = fp.read() ret = fp.close() if ret: self.ui.warn(out) raise util.Abort( _('bugzilla notify command %s') % util.explain_exit(ret)[0]) self.ui.status(_('done\n'))
def notify(self, ids, committer): '''tell bugzilla to send mail.''' self.ui.status(_('telling bugzilla to send mail:\n')) (user, userid) = self.get_bugzilla_user(committer) for id in ids: self.ui.status(_(' bug %s\n') % id) cmdfmt = self.ui.config('bugzilla', 'notify', self.default_notify) bzdir = self.ui.config('bugzilla', 'bzdir', '/var/www/html/bugzilla') try: # Backwards-compatible with old notify string, which # took one string. This will throw with a new format # string. cmd = cmdfmt % id except TypeError: cmd = cmdfmt % {'bzdir': bzdir, 'id': id, 'user': user} self.ui.note(_('running notify command %s\n') % cmd) fp = util.popen('(%s) 2>&1' % cmd) out = fp.read() ret = fp.close() if ret: self.ui.warn(out) raise util.Abort(_('bugzilla notify command %s') % util.explain_exit(ret)[0]) self.ui.status(_('done\n'))
def checkexit(self, status, output=''): if status: if output: self.ui.warn(_('%s error:\n') % self.command) self.ui.warn(output) msg = util.explain_exit(status)[0] raise util.Abort('%s %s' % (self.command, msg))
def checkexit(self, status, output=''): if status: if output: self.ui.warn(_('%s error:\n') % self.command) self.ui.warn(output) msg = util.explain_exit(status)[0] raise util.Abort(_('%s %s') % (self.command, msg))
def notify(self, ids): '''tell bugzilla to send mail.''' self.ui.status(_('telling bugzilla to send mail:\n')) for id in ids: self.ui.status(_(' bug %s\n') % id) cmd = self.ui.config('bugzilla', 'notify', 'cd /var/www/html/bugzilla && ' './processmail %s [email protected]') % id fp = os.popen('(%s) 2>&1' % cmd) out = fp.read() ret = fp.close() if ret: self.ui.warn(out) raise util.Abort(_('bugzilla notify command %s') % util.explain_exit(ret)[0]) self.ui.status(_('done\n'))
def notify(self, ids): '''tell bugzilla to send mail.''' self.ui.status(_('telling bugzilla to send mail:\n')) for id in ids: self.ui.status(_(' bug %s\n') % id) cmd = self.ui.config( 'bugzilla', 'notify', 'cd /var/www/html/bugzilla && ' './processmail %s [email protected]') % id fp = os.popen('(%s) 2>&1' % cmd) out = fp.read() ret = fp.close() if ret: self.ui.warn(out) raise util.Abort( _('bugzilla notify command %s') % util.explain_exit(ret)[0]) self.ui.status(_('done\n'))
def notify(self, ids, committer): """tell bugzilla to send mail.""" self.ui.status(_("telling bugzilla to send mail:\n")) (user, userid) = self.get_bugzilla_user(committer) for id in ids: self.ui.status(_(" bug %s\n") % id) cmdfmt = self.ui.config("bugzilla", "notify", self.default_notify) bzdir = self.ui.config("bugzilla", "bzdir", "/var/www/html/bugzilla") try: # Backwards-compatible with old notify string, which # took one string. This will throw with a new format # string. cmd = cmdfmt % id except TypeError: cmd = cmdfmt % {"bzdir": bzdir, "id": id, "user": user} self.ui.note(_("running notify command %s\n") % cmd) fp = util.popen("(%s) 2>&1" % cmd) out = fp.read() ret = fp.close() if ret: self.ui.warn(out) raise util.Abort(_("bugzilla notify command %s") % util.explain_exit(ret)[0]) self.ui.status(_("done\n"))