Skip to content

Commit cb93ba8

Browse files
committed
Fixed a py2/py3 issue in post_approved_draft()
- Legacy-Id: 17258
1 parent 29686d5 commit cb93ba8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/sync/rfceditor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from xml.dom import pulldom, Node
1616

1717
from django.conf import settings
18+
from django.utils.encoding import smart_bytes, force_str
1819

1920
import debug # pyflakes:ignore
2021

@@ -543,7 +544,7 @@ def post_approved_draft(url, name):
543544
# HTTP basic auth
544545
username = "dtracksync"
545546
password = settings.RFC_EDITOR_SYNC_PASSWORD
546-
request.add_header("Authorization", "Basic %s" % base64.encodestring("%s:%s" % (username, password)).replace("\n", ""))
547+
request.add_header("Authorization", "Basic %s" % force_str(base64.encodestring(smart_bytes("%s:%s" % (username, password)))).replace("\n", ""))
547548

548549
if settings.SERVER_MODE != "production":
549550
return ("OK", "")

0 commit comments

Comments
 (0)