Show More
@@ -197,7 +197,7 b' class IPControllerApp(BaseParallelApplication):' | |||||
197 | location = socket.gethostbyname_ex(socket.gethostname())[2][-1] |
|
197 | location = socket.gethostbyname_ex(socket.gethostname())[2][-1] | |
198 | cdict['location'] = location |
|
198 | cdict['location'] = location | |
199 | fname = os.path.join(self.profile_dir.security_dir, fname) |
|
199 | fname = os.path.join(self.profile_dir.security_dir, fname) | |
200 | with open(fname, 'w') as f: |
|
200 | with open(fname, 'wb') as f: | |
201 | f.write(json.dumps(cdict, indent=2)) |
|
201 | f.write(json.dumps(cdict, indent=2)) | |
202 | os.chmod(fname, stat.S_IRUSR|stat.S_IWUSR) |
|
202 | os.chmod(fname, stat.S_IRUSR|stat.S_IWUSR) | |
203 |
|
203 |
@@ -250,7 +250,7 b' class HubFactory(RegistrationFactory):' | |||||
250 |
|
250 | |||
251 | # monitor socket |
|
251 | # monitor socket | |
252 | sub = ctx.socket(zmq.SUB) |
|
252 | sub = ctx.socket(zmq.SUB) | |
253 | sub.setsockopt(zmq.SUBSCRIBE, "") |
|
253 | sub.setsockopt(zmq.SUBSCRIBE, b"") | |
254 | sub.bind(self.monitor_url) |
|
254 | sub.bind(self.monitor_url) | |
255 | sub.bind('inproc://monitor') |
|
255 | sub.bind('inproc://monitor') | |
256 | sub = ZMQStream(sub, loop) |
|
256 | sub = ZMQStream(sub, loop) |
@@ -678,7 +678,7 b' def launch_scheduler(in_addr, out_addr, mon_addr, not_addr, config=None,' | |||||
678 | mons = zmqstream.ZMQStream(ctx.socket(zmq.PUB),loop) |
|
678 | mons = zmqstream.ZMQStream(ctx.socket(zmq.PUB),loop) | |
679 | mons.connect(mon_addr) |
|
679 | mons.connect(mon_addr) | |
680 | nots = zmqstream.ZMQStream(ctx.socket(zmq.SUB),loop) |
|
680 | nots = zmqstream.ZMQStream(ctx.socket(zmq.SUB),loop) | |
681 | nots.setsockopt(zmq.SUBSCRIBE, '') |
|
681 | nots.setsockopt(zmq.SUBSCRIBE, b'') | |
682 | nots.connect(not_addr) |
|
682 | nots.connect(not_addr) | |
683 |
|
683 | |||
684 | # setup logging. |
|
684 | # setup logging. |
@@ -704,15 +704,15 b' class TestComplex(TraitTestBase):' | |||||
704 |
|
704 | |||
705 | class BytesTrait(HasTraits): |
|
705 | class BytesTrait(HasTraits): | |
706 |
|
706 | |||
707 | value = Bytes('string') |
|
707 | value = Bytes(b'string') | |
708 |
|
708 | |||
709 | class TestBytes(TraitTestBase): |
|
709 | class TestBytes(TraitTestBase): | |
710 |
|
710 | |||
711 | obj = BytesTrait() |
|
711 | obj = BytesTrait() | |
712 |
|
712 | |||
713 | _default_value = 'string' |
|
713 | _default_value = b'string' | |
714 | _good_values = ['10', '-10', '10L', |
|
714 | _good_values = [b'10', b'-10', b'10L', | |
715 | '-10L', '10.1', '-10.1', 'string'] |
|
715 | b'-10L', b'10.1', b'-10.1', b'string'] | |
716 | _bad_values = [10, -10, 10L, -10L, 10.1, -10.1, 1j, [10], |
|
716 | _bad_values = [10, -10, 10L, -10L, 10.1, -10.1, 1j, [10], | |
717 | ['ten'],{'ten': 10},(10,), None, u'string'] |
|
717 | ['ten'],{'ten': 10},(10,), None, u'string'] | |
718 |
|
718 |
@@ -82,7 +82,7 b' default_packer = json_packer' | |||||
82 | default_unpacker = json_unpacker |
|
82 | default_unpacker = json_unpacker | |
83 |
|
83 | |||
84 |
|
84 | |||
85 | DELIM="<IDS|MSG>" |
|
85 | DELIM=b"<IDS|MSG>" | |
86 |
|
86 | |||
87 | #----------------------------------------------------------------------------- |
|
87 | #----------------------------------------------------------------------------- | |
88 | # Classes |
|
88 | # Classes |
General Comments 0
You need to be logged in to leave comments.
Login now