Browse Source

voixicron: redirect stderr to stdout while fetching available output to crrectly report error messages

Helmut Pozimski 7 years ago
parent
commit
f094a463ba
1 changed files with 4 additions and 3 deletions
  1. 4 3
      voixicron.py

+ 4 - 3
voixicron.py

@@ -19,7 +19,7 @@ import argparse
 from email.mime.multipart import MIMEMultipart
 from email.mime.text import MIMEText
 
-__version__ = "0.3"
+__version__ = "0.3.1"
 
 # Configuration parameters used to send notifications and change the logging
 # behaviour. The option configuration file may contain any of the keys used
@@ -70,9 +70,10 @@ except subprocess.CalledProcessError:
 
 try:
     XBPS_INSTALL_RESULT = subprocess.check_output(["xbps-install", "-Sun"],
-                                                  stderr=DEVNULL)
+                                                  stderr=subprocess.STDOUT)
 except subprocess.CalledProcessError as error:
-    LOGGER.error("Could not get list of updated packages, xbps-install error:"
+    LOGGER.error("Could not get list of available updates, "
+                 "xbps-install error:"
                  " %s", error.output)
     sys.exit(1)
 else: