diff options
author | Brian May <brian@linuxpenguins.xyz> | 2018-06-18 17:11:31 +1000 |
---|---|---|
committer | Brian May <brian@linuxpenguins.xyz> | 2018-07-15 09:03:43 +1000 |
commit | 7d08ad9158507856c31222fbbd12b2f8ba238c4d (patch) | |
tree | 0af73b104c364b6c1d1bd58a77ad19b168823a7f /lib/python/web_support.py | |
parent | e76615770ebaa46808ff548412d3b508919f6497 (diff) |
Replace <> with != for Python 3.6 compatibility
Diffstat (limited to 'lib/python/web_support.py')
-rw-r--r-- | lib/python/web_support.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/python/web_support.py b/lib/python/web_support.py index 1e204d06bc..dc54c5b07a 100644 --- a/lib/python/web_support.py +++ b/lib/python/web_support.py @@ -78,7 +78,7 @@ class Service: def read(count): data = '' cnt = 0 - while cnt <> count: + while cnt != count: d = client.recv(count - cnt) if d: data += d @@ -93,9 +93,9 @@ class Service: header = read(24) (magic, version, cli_size, cli_count, env_size, env_count) = \ struct.unpack("!6I", header) - if magic <> 0x15fd34df: + if magic != 0x15fd34df: sys.log("unknown magic number %08X", magic) - if version <> 1: + if version != 1: sys.log("unknown version %08X", magic) cli = read(cli_size).split('\0')[:-1] env = {} @@ -515,7 +515,7 @@ def make_numbered_list(entries): def make_list(lst, separator=", "): """Creates a list of HTML elements.""" - assert type(lst) <> types.StringType + assert type(lst) != types.StringType c = [] if lst: append = c.append @@ -551,12 +551,12 @@ class PathRouter: m = m[element] else: if element == '*': - if x + 1 <> len(p): + if x + 1 != len(p): raise ValueError('wildcard * in the middle of path') m['*'] = value return if element == '**': - if x + 1 <> len(p): + if x + 1 != len(p): raise ValueError( 'wildcard ** in the middle of path') m['**'] = value @@ -756,7 +756,7 @@ class WebService(Service, WebServiceBase): path = environment.get('PATH_INFO', '') server_name = environment.get('SERVER_NAME', '') server_port = environment.get('SERVER_PORT', '') - if server_port and server_port <> 80: + if server_port and server_port != 80: server_name = server_name + ":" + server_port script_name = environment.get('SCRIPT_NAME', '') |