use byte literals in multiprocessing

This commit is contained in:
Benjamin Peterson 2008-06-25 12:39:05 +00:00
parent 41a7ce0a2e
commit b09c9396cd
1 changed files with 3 additions and 8 deletions

View File

@ -352,14 +352,9 @@ if sys.platform == 'win32':
MESSAGE_LENGTH = 20
CHALLENGE = '#CHALLENGE#'
WELCOME = '#WELCOME#'
FAILURE = '#FAILURE#'
if sys.version_info >= (3, 0): # XXX can use bytes literals in 2.6/3.0
CHALLENGE = CHALLENGE.encode('ascii')
WELCOME = WELCOME.encode('ascii')
FAILURE = FAILURE.encode('ascii')
CHALLENGE = b'#CHALLENGE#'
WELCOME = b'#WELCOME#'
FAILURE = b'#FAILURE#'
def deliver_challenge(connection, authkey):
import hmac