diff --git a/debian/changelog b/debian/changelog index 43dd466e..5a2f28a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ byobu (2.78) UNRELEASED; urgency=low * usr/bin/byobu-select-session: revert recent change, which defaulted to -UDR (which detached and logged out other connections on reattach); feedback was negative on this one, numerous questions in IRC, LP: #589027 + * usr/bin/byobu-select-session: allow for default selection of session 1 -- Dustin Kirkland Tue, 01 Jun 2010 10:53:54 -0500 diff --git a/usr/bin/byobu-select-session b/usr/bin/byobu-select-session index 703eb80f..92615c5b 100755 --- a/usr/bin/byobu-select-session +++ b/usr/bin/byobu-select-session @@ -44,14 +44,18 @@ if i > 1: i += 1 try: choice = input("\nChoose 1-%d [1]: " % (i-1)) - if choice < 1 or choice >= i: + if choice >= 1 and choice < i: + break + else: + tries += 1 choice = "" + sys.stderr.write("\nERROR: Invalid input\n"); except: + if choice == "": + choice = 1 + break tries += 1 choice = "" - if choice: - break - else: sys.stderr.write("\nERROR: Invalid input\n"); if choice: