diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index c907b5a..bbc3ab2 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -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" diff --git a/davtelepot/utilities.py b/davtelepot/utilities.py index ea1133a..74d0655 100644 --- a/davtelepot/utilities.py +++ b/davtelepot/utilities.py @@ -1714,8 +1714,10 @@ async def aio_subprocess_shell(command: str) -> Tuple[str, str]: command ) stdout, stderr = await _subprocess.communicate() - stdout = stdout.decode().strip() - stderr = stderr.decode().strip() + if stdout: + stdout = stdout.decode().strip() + if stderr: + stderr = stderr.decode().strip() except Exception as e: logging.error( "Exception {e}:\n{o}\n{er}".format(