diff --git a/gnpy/tools/cli_examples.py b/gnpy/tools/cli_examples.py index 3b14dcdb..0f72b9cb 100644 --- a/gnpy/tools/cli_examples.py +++ b/gnpy/tools/cli_examples.py @@ -9,7 +9,6 @@ Common code for CLI examples ''' import argparse -from json import dumps import logging import os.path import sys diff --git a/gnpy/tools/convert.py b/gnpy/tools/convert.py index 756ebf3e..bd468948 100755 --- a/gnpy/tools/convert.py +++ b/gnpy/tools/convert.py @@ -694,8 +694,6 @@ def connect_eqpt(from_, in_, to_): def eqpt_in_city_to_city(in_city, to_city, direction='east'): rev_direction = 'west' if direction == 'east' else 'east' - amp_direction = f'{direction}_amp_type' - amp_rev_direction = f'{rev_direction}_amp_type' return_eqpt = '' if in_city in eqpts_by_city: for e in eqpts_by_city[in_city]: @@ -705,7 +703,6 @@ def eqpt_in_city_to_city(in_city, to_city, direction='east'): elif nodes_by_city[in_city].node_type.lower() == 'ila': if e.to_city != to_city: direction = rev_direction - amp_direction = amp_rev_direction return_eqpt = f'{direction} edfa in {e.from_city} to {e.to_city}' elif nodes_by_city[in_city].node_type.lower() == 'ila': return_eqpt = f'{direction} edfa in {in_city}' diff --git a/gnpy/tools/json_io.py b/gnpy/tools/json_io.py index 1b60baf6..916c3a39 100644 --- a/gnpy/tools/json_io.py +++ b/gnpy/tools/json_io.py @@ -534,10 +534,9 @@ def convert_service_sheet( network, network_filename=None, output_filename='', - bidir=False, - filter_region=None): + bidir=False): if output_filename == '': output_filename = f'{str(input_filename)[0:len(str(input_filename))-len(str(input_filename.suffixes[0]))]}_services.json' - data = read_service_sheet(input_filename, eqpt, network, network_filename, bidir, filter_region) + data = read_service_sheet(input_filename, eqpt, network, network_filename, bidir) save_json(data, output_filename) return data diff --git a/gnpy/tools/service_sheet.py b/gnpy/tools/service_sheet.py index 6d4eb829..cf4c4b74 100644 --- a/gnpy/tools/service_sheet.py +++ b/gnpy/tools/service_sheet.py @@ -178,12 +178,9 @@ def read_service_sheet( eqpt, network, network_filename=None, - bidir=False, - filter_region=None): + bidir=False): """ converts a service sheet into a json structure """ - if filter_region is None: - filter_region = [] if network_filename is None: network_filename = input_filename service = parse_excel(input_filename)