contrib/release.py: email: don't write '<>' for message-id twice
Minor code refactoring. Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
832c704443
commit
8c9cd5b7e3
@ -230,7 +230,7 @@ class User(object):
|
||||
answer = User.request(msg, prompt).lower()
|
||||
if answer in ['y', 'yes']:
|
||||
return True
|
||||
if defaultToYes and answer not in ['n', 'no']:
|
||||
if defaultToYes is not False and answer not in ['n', 'no']:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
@ -221,7 +221,7 @@ class Announce(object):
|
||||
self.version = version
|
||||
|
||||
def setHeaders(self, messageId, date):
|
||||
self.fd.write("Message-Id: <{}>\n".format(messageId))
|
||||
self.fd.write("Message-Id: {}\n".format(messageId))
|
||||
self.fd.write("Date: {}\n".format(date))
|
||||
self.fd.write("From: Nicolas Sebrecht <nicolas.s-dev@laposte.net>\n")
|
||||
self.fd.write("To: {}\n".format(MAILING_LIST))
|
||||
@ -261,8 +261,8 @@ Pip:
|
||||
|
||||
class Website(object):
|
||||
def updateAPI(self):
|
||||
req = "update API of the website? (requires {}) [Y/n]".format(SPHINXBUILD)
|
||||
if not User.yesNo(req, defaultToYes=True):
|
||||
req = "update API of the website? (requires {})".format(SPHINXBUILD)
|
||||
if User.yesNo(req, defaultToYes=True) is False:
|
||||
return False
|
||||
|
||||
if check_call(shlex.split("{} --version".format(SPHINXBUILD))) != 0:
|
||||
|
Loading…
Reference in New Issue
Block a user