diff --git a/aioupnp/upnp.py b/aioupnp/upnp.py index 19eac13..3f7d180 100644 --- a/aioupnp/upnp.py +++ b/aioupnp/upnp.py @@ -199,7 +199,7 @@ class UPnP: except (UPnPError, NotImplementedError): print("failed to add and remove a mapping") - if self.gateway._device: + if self.gateway.devices: device = list(self.gateway.devices.values())[0] assert device.manufacturer and device.modelName device_path = os.path.join(os.getcwd(), self.gateway.manufacturer_string)