From 332b659bc70cc14b879be75405ed06ca92b1f0a0 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 15 Dec 2016 09:07:56 -0800 Subject: nocscript: Fixed build issue on Py3k --- host/lib/rfnoc/nocscript/gen_basic_funcs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/rfnoc') diff --git a/host/lib/rfnoc/nocscript/gen_basic_funcs.py b/host/lib/rfnoc/nocscript/gen_basic_funcs.py index 702b3e884..20d3c82fd 100755 --- a/host/lib/rfnoc/nocscript/gen_basic_funcs.py +++ b/host/lib/rfnoc/nocscript/gen_basic_funcs.py @@ -452,9 +452,9 @@ def write_manual_file(output_filename): func_list = prep_function_list() func_list_tree = {} for func in func_list: - if not func_list_tree.has_key(func['category']): + if func['category'] not in func_list_tree: func_list_tree[func['category']] = {} - if not func_list_tree[func['category']].has_key(func['name']): + if func['name'] not in func_list_tree[func['category']]: func_list_tree[func['category']][func['name']] = [] func_list_tree[func['category']][func['name']].append(func) open(output_filename, 'w').write(parse_tmpl(DOXY_TEMPLATE, func_list_tree=func_list_tree)) -- cgit v1.2.3 From 707e503d862486a9c8a4600a1af08811d6aa821b Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Fri, 16 Dec 2016 12:22:05 -0500 Subject: nocscript: fully fix build issue on Py3k --- host/lib/rfnoc/nocscript/gen_basic_funcs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/rfnoc') diff --git a/host/lib/rfnoc/nocscript/gen_basic_funcs.py b/host/lib/rfnoc/nocscript/gen_basic_funcs.py index 20d3c82fd..e4971d2e9 100755 --- a/host/lib/rfnoc/nocscript/gen_basic_funcs.py +++ b/host/lib/rfnoc/nocscript/gen_basic_funcs.py @@ -331,9 +331,9 @@ REGISTER_COMMANDS_TEMPLATE = """ );""" DOXY_TEMPLATE = """/*! \page page_nocscript_funcs NocScript Function Reference -% for cat, func_by_name in func_list_tree.iteritems(): +% for cat, func_by_name in func_list_tree.items(): - ${cat} -% for func_name, func_info_list in func_by_name.iteritems(): +% for func_name, func_info_list in func_by_name.items(): - ${func_name}: ${func_info_list[0]['docstring']} % for func_info in func_info_list: - ${func_info['arglist']} -> ${func_info['retval']} -- cgit v1.2.3