Catch connection.Error in WifiPreTest.setup_openwrt_connection() am: a6dfa1c1e1

Original change: https://android-review.googlesource.com/c/platform/tools/test/connectivity/+/3302838

Change-Id: I764ce41713aa55a09e301af7660523ca7cbc3e7e
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/acts_tests/tests/google/wifi/WifiPreTest.py b/acts_tests/tests/google/wifi/WifiPreTest.py
index cc47078..829241e 100644
--- a/acts_tests/tests/google/wifi/WifiPreTest.py
+++ b/acts_tests/tests/google/wifi/WifiPreTest.py
@@ -100,10 +100,13 @@
         openwrt.ssh = connection.SshConnection(openwrt.ssh_settings)
         openwrt.ssh.setup_master_ssh()
         return True
-      except (paramiko.ssh_exception.NoValidConnectionsError,
-              paramiko.ssh_exception.AuthenticationException,
-              paramiko.ssh_exception.SSHException,
-              TimeoutError) as e:
+      except (
+          paramiko.ssh_exception.NoValidConnectionsError,
+          paramiko.ssh_exception.AuthenticationException,
+          paramiko.ssh_exception.SSHException,
+          connection.Error,
+          TimeoutError,
+      ) as e:
         logging.info(f"Connection error: {e}, reconnecting {ip} "
                       f"in {retry_duration} seconds.")
         time.sleep(_POLL_AP_RETRY_INTERVAL_SEC)
@@ -131,7 +134,7 @@
         for radio in radios:
           ssid_radio_map = openwrt.get_ifnames_for_ssids(radio)
           for ssid, radio_ifname in ssid_radio_map.items():
-              openwrt.log.info(f"{radio_ifname}:  {ssid}")
+            openwrt.log.info(f"{radio_ifname}:  {ssid}")
 
         band_bssid_map = openwrt.get_bssids_for_wifi_networks()
         openwrt.log.info(band_bssid_map)