mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-20 10:24:18 +03:00
Python 3 syntax fixes
This commit is contained in:
committed by
Ivan Grokhotkov
parent
8edeac0cf4
commit
7dca0727e1
@ -159,7 +159,7 @@ linkcheck_anchors_ignore = ["/#!"]
|
|||||||
#
|
#
|
||||||
# on_rtd is whether we are on readthedocs.org
|
# on_rtd is whether we are on readthedocs.org
|
||||||
env_readthedocs = os.environ.get('READTHEDOCS', None)
|
env_readthedocs = os.environ.get('READTHEDOCS', None)
|
||||||
print env_readthedocs
|
print(env_readthedocs)
|
||||||
|
|
||||||
if not env_readthedocs: # only import and set the theme if we're building docs locally
|
if not env_readthedocs: # only import and set the theme if we're building docs locally
|
||||||
import sphinx_rtd_theme
|
import sphinx_rtd_theme
|
||||||
|
@ -24,7 +24,7 @@ def setup_echo_server(e):
|
|||||||
while len(data) < 1024 and retries < 3:
|
while len(data) < 1024 and retries < 3:
|
||||||
data += sock.recv(1024)
|
data += sock.recv(1024)
|
||||||
retries += 1
|
retries += 1
|
||||||
print 'Received {} bytes'.format(len(data))
|
print('Received {} bytes'.format(len(data)))
|
||||||
if len(data) != 1024:
|
if len(data) != 1024:
|
||||||
raise RuntimeError('client failed to receive response')
|
raise RuntimeError('client failed to receive response')
|
||||||
count += 1
|
count += 1
|
||||||
|
@ -58,7 +58,7 @@ def setup_http_get(e):
|
|||||||
def flaskThread():
|
def flaskThread():
|
||||||
p = os.path.dirname(os.path.abspath(__file__))
|
p = os.path.dirname(os.path.abspath(__file__))
|
||||||
context = (p + '/server.crt', p + '/server.key')
|
context = (p + '/server.crt', p + '/server.key')
|
||||||
print context
|
print(context)
|
||||||
app.run(host='0.0.0.0', port=8088, ssl_context=context)
|
app.run(host='0.0.0.0', port=8088, ssl_context=context)
|
||||||
th = Thread(target=flaskThread)
|
th = Thread(target=flaskThread)
|
||||||
th.start()
|
th.start()
|
||||||
|
Reference in New Issue
Block a user