From 5b6a588fd768fce732971a7fe4d1e567a0647a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Sun, 14 May 2017 17:45:11 +0200 Subject: [PATCH] Fix traceback when EOF in package selection --- agetpkg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agetpkg b/agetpkg index ff7410f..d3b066c 100755 --- a/agetpkg +++ b/agetpkg @@ -288,7 +288,10 @@ def select_packages(packages, select_all=False): print("{:{pad}} {}".format(i, pkg, pad=pad)) selection = "" while not match("^(\d+ ){0,}\d+$", selection): - selection = input("Select packages (* for all): ").strip() + try: + selection = input("Select packages (* for all): ").strip() + except EOFError: + return if selection == "": return # shortcut to select all packages -- GitLab