usr/bin/byobu-select-session: allow for default selection of session 1

This commit is contained in:
Dustin Kirkland 2010-06-03 01:15:20 -05:00
commit 886a086b50
2 changed files with 9 additions and 4 deletions

1
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Tue, 01 Jun 2010 10:53:54 -0500

View file

@ -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: