Update gdbus.py (#460)

* Update gdbus.py

* Update gdbus.py
This commit is contained in:
Pascal Vizeli 2018-05-04 20:58:23 +02:00 committed by GitHub
parent 77881e8a58
commit db444b89d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,17 +123,17 @@ class DBus:
*command,
stdin=asyncio.subprocess.DEVNULL,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.DEVNULL
stderr=asyncio.subprocess.PIPE
)
data, _ = await proc.communicate()
data, error = await proc.communicate()
except OSError as err:
_LOGGER.error("DBus fatal error: %s", err)
raise DBusFatalError() from None
# Success?
if proc.returncode != 0:
_LOGGER.error("DBus return error: %s", data)
_LOGGER.error("DBus return error: %s", error)
raise DBusFatalError()
# End