base_network: Fix _add_links_from_tyndp if there are none left (fixes #5)
This commit is contained in:
parent
15e986a0ec
commit
1b6fe5be80
@ -117,7 +117,10 @@ def _add_links_from_tyndp(buses, links):
|
|||||||
if not is_within_covered_countries_b.all():
|
if not is_within_covered_countries_b.all():
|
||||||
logger.info("TYNDP links outside of the covered area (skipping): " +
|
logger.info("TYNDP links outside of the covered area (skipping): " +
|
||||||
", ".join(links_tyndp.loc[~ is_within_covered_countries_b, "Name"]))
|
", ".join(links_tyndp.loc[~ is_within_covered_countries_b, "Name"]))
|
||||||
|
|
||||||
links_tyndp = links_tyndp.loc[is_within_covered_countries_b]
|
links_tyndp = links_tyndp.loc[is_within_covered_countries_b]
|
||||||
|
if links_tyndp.empty:
|
||||||
|
return buses, links
|
||||||
|
|
||||||
has_replaces_b = links_tyndp.replaces.notnull()
|
has_replaces_b = links_tyndp.replaces.notnull()
|
||||||
oids = dict(Bus=_get_oid(buses), Link=_get_oid(links))
|
oids = dict(Bus=_get_oid(buses), Link=_get_oid(links))
|
||||||
|
Loading…
Reference in New Issue
Block a user