You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-process/bpytop/files/bpytop-1.0.61-tests.patch

21 lines
768 B

diff --git a/bpytop.py b/bpytop.py
index 38d6e8b..12e4853 100755
--- a/bpytop.py
+++ b/bpytop.py
@@ -65,10 +65,11 @@ args.add_argument("-v", "--version", action="store_true", help = "show versio
args.add_argument("--debug", action="store_true", help = "start with loglevel set to DEBUG overriding value set in config")
stdargs = args.parse_args()
-if stdargs.version:
- print(f'bpytop version: {VERSION}\n'
- f'psutil version: {".".join(str(x) for x in psutil.version_info)}')
- raise SystemExit(0)
+if __name__ == "__main__":
+ if stdargs.version:
+ print(f'bpytop version: {VERSION}\n'
+ f'psutil version: {".".join(str(x) for x in psutil.version_info)}')
+ raise SystemExit(0)
ARG_BOXES: str = stdargs.boxes
LOW_COLOR: bool = stdargs.low_color