Loading agetpkg +2 −1 Original line number Original line Diff line number Diff line Loading @@ -282,8 +282,9 @@ def select_packages(packages): else: else: # display a list of packages to select # display a list of packages to select index = dict(enumerate(packages)) index = dict(enumerate(packages)) pad = len("%d" % max(index.keys())) for i, pkg in index.items(): for i, pkg in index.items(): print(i, pkg) print("{:{pad}} {}".format(i, pkg, pad=pad)) selection = "" selection = "" while not match("^(\d+ ){0,}\d+$", selection): while not match("^(\d+ ){0,}\d+$", selection): selection = input("Select packages: ").strip() selection = input("Select packages: ").strip() Loading Loading
agetpkg +2 −1 Original line number Original line Diff line number Diff line Loading @@ -282,8 +282,9 @@ def select_packages(packages): else: else: # display a list of packages to select # display a list of packages to select index = dict(enumerate(packages)) index = dict(enumerate(packages)) pad = len("%d" % max(index.keys())) for i, pkg in index.items(): for i, pkg in index.items(): print(i, pkg) print("{:{pad}} {}".format(i, pkg, pad=pad)) selection = "" selection = "" while not match("^(\d+ ){0,}\d+$", selection): while not match("^(\d+ ){0,}\d+$", selection): selection = input("Select packages: ").strip() selection = input("Select packages: ").strip() Loading