Queer European MD passionate about IT
Procházet zdrojové kódy

Redirect stderro to stdout

Davte před 5 roky
rodič
revize
b4ad650372
2 změnil soubory, kde provedl 3 přidání a 5 odebrání
  1. 1 1
      davtelepot/__init__.py
  2. 2 4
      davtelepot/administration_tools.py

+ 1 - 1
davtelepot/__init__.py

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

+ 2 - 4
davtelepot/administration_tools.py

@@ -783,11 +783,9 @@ async def _version_command(bot, update, user_record):
         _subprocess = await asyncio.create_subprocess_exec(
             'git', 'rev-parse', 'HEAD',
             stdout=asyncio.subprocess.PIPE,
-            stderr=asyncio.subprocess.PIPE
+            stderr=asyncio.subprocess.STDOUT
         )
-        stdout, stderr = await _subprocess.communicate()
-        if stderr is not None:
-            raise Exception(stderr.decode().strip())
+        stdout, _ = await _subprocess.communicate()
         version = stdout.decode().strip()
     except Exception as e:
         return f"{e}"