diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-06-25 12:39:05 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-06-25 12:39:05 (GMT) |
commit | b09c9396cd74a50c237b77c76efa70e4a1aca863 (patch) | |
tree | 7773d13a0cb461f31dfcf71b9e2383bd11183a49 /Lib/multiprocessing | |
parent | 41a7ce0a2eee3580ab22cb5e90413d34cf7a0a61 (diff) | |
download | cpython-b09c9396cd74a50c237b77c76efa70e4a1aca863.zip cpython-b09c9396cd74a50c237b77c76efa70e4a1aca863.tar.gz cpython-b09c9396cd74a50c237b77c76efa70e4a1aca863.tar.bz2 |
use byte literals in multiprocessing
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r-- | Lib/multiprocessing/connection.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index cfb7201..b1deb7b 100644 --- a/Lib/multiprocessing/connection.py +++ b/Lib/multiprocessing/connection.py @@ -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 |