Don't actually do a post to the rfc-editor's state sync interface for a publication request when not in production mode.

- Legacy-Id: 5773
This commit is contained in:
Henrik Levkowetz 2013-06-03 20:49:40 +00:00
parent 9e8f504447
commit 8eec9ccb15

View file

@ -461,6 +461,9 @@ def post_approved_draft(url, name):
password = settings.RFC_EDITOR_SYNC_PASSWORD
request.add_header("Authorization", "Basic %s" % base64.encodestring("%s:%s" % (username, password)).replace("\n", ""))
if settings.SERVER_MODE != "production":
return ("OK", "")
text = error = ""
try:
f = urllib2.urlopen(request, data=urllib.urlencode({ 'approved_draft_name': name }), timeout=20)