qutebrowser profile manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

log menu's stderr if it fails

+7 -2
+7 -2
qbpm/operations.py
··· 3 3 import shutil 4 4 import subprocess 5 5 from pathlib import Path 6 - from sys import platform 6 + from sys import platform, stderr 7 7 from typing import List, Optional 8 8 9 9 from xdg import BaseDirectory # type: ignore ··· 97 97 98 98 command = menu_command(menu, profiles, args) 99 99 selection_cmd = subprocess.Popen( 100 - command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL 100 + command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE 101 101 ) 102 102 out = selection_cmd.stdout 103 103 if not out: ··· 110 110 launch(profile, True, args.foreground, args.qb_args) 111 111 else: 112 112 error("No profile selected") 113 + if err := selection_cmd.stderr: 114 + msg = err.read().decode(errors="ignore").rstrip("\n") 115 + if msg: 116 + for line in msg.split("\n"): 117 + print(f"stderr: {line}", file=stderr) 113 118 114 119 115 120 def menu_command(menu: str, profiles, args: argparse.Namespace) -> str: