From: Arnaud Giersch Date: Fri, 5 May 2023 08:38:39 +0000 (+0200) Subject: Fix sonar bug: attribute access on a value that can be 'None'. X-Git-Tag: v3.34~131^2~7 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c3cbea7123982773a7f431bf9f667ff6fa99f004 Fix sonar bug: attribute access on a value that can be 'None'. --- diff --git a/examples/python/clusters-multicpu/clusters-multicpu.py b/examples/python/clusters-multicpu/clusters-multicpu.py index 8f7240a060..79ee80cf98 100644 --- a/examples/python/clusters-multicpu/clusters-multicpu.py +++ b/examples/python/clusters-multicpu/clusters-multicpu.py @@ -101,7 +101,7 @@ def create_hostzone(zone: simgrid.NetZone, coord: typing.List[int], ident: int) host = host_zone.create_host(cpu_name, speed).seal() # the first CPU is the gateway if i == 0: - gateway = host + gateway = host.netpoint # create split-duplex link link = host_zone.create_split_duplex_link("link-" + cpu_name, link_bw) link.set_latency(link_lat).seal() @@ -111,7 +111,7 @@ def create_hostzone(zone: simgrid.NetZone, coord: typing.List[int], ident: int) # seal newly created netzone host_zone.seal() - return host_zone.netpoint, gateway.netpoint + return host_zone.netpoint, gateway #####################################################################################################