Prevent decoding None objects

This commit is contained in:
Davte 2020-07-15 13:15:48 +02:00
parent ed05d843bc
commit ada375b766
Signed by: Davte
GPG Key ID: D848081D6F892DA9
2 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,7 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0"
__version__ = "2.6.6"
__version__ = "2.6.7"
__maintainer__ = "Davide Testa"
__contact__ = "t.me/davte"

View File

@ -1714,7 +1714,9 @@ async def aio_subprocess_shell(command: str) -> Tuple[str, str]:
command
)
stdout, stderr = await _subprocess.communicate()
if stdout:
stdout = stdout.decode().strip()
if stderr:
stderr = stderr.decode().strip()
except Exception as e:
logging.error(