For reasons unknown to me apport-cli only reads one character. 37 def raw_input_char(self, prompt): 38 '''raw_input, but read only one character''' 39 40 sys.stdout.write(prompt) 41 sys.stdout.write(' ') 42 sys.stdout.flush() 43 44 file = sys.stdin.fileno() 45 saved_attributes = termios.tcgetattr(file) 46 attributes = termios.tcgetattr(file) 47 attributes[3] = attributes[3] & ~(termios.ICANON) 48 attributes[6][termios.VMIN] = 1 49 attributes[6][termios.VTIME] = 0 50 termios.tcsetattr(file, termios.TCSANOW, attributes) 51 52 try: 53 ch = str(sys.stdin.read(1)) 54 finally: 55 termios.tcsetattr(file, termios.TCSANOW, saved_attributes) 56 57 sys.stdout.write('\n') 58 return ch
** Changed in: apport (Ubuntu) Status: New => Triaged ** Changed in: apport (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apport in Ubuntu. https://bugs.launchpad.net/bugs/1722564 Title: apport question will not accept multi-character responses Status in apport package in Ubuntu: Triaged Bug description: the newly added cloud-init apport support shows a list of cloud providers and asks the user to select one. There are currently 18 options. For any option > 10, apport will just take the '1' that is typed as the answer. It should obviously wait for more than one character or a carriage return. *** Please select the cloud vendor or environment in which this instance is running Choices: 1: Amazon - Ec2 2: AliYun 3: AltCloud 4: Azure 5: Bigstep 6: CloudSigma 7: CloudStack 8: DigitalOcean 9: GCE - Google Compute Engine 10: MAAS 11: NoCloud 12: OpenNebula 13: OpenStack 14: OVF 15: Scaleway 16: SmartOS 17: VMware 18: Other C: Cancel Please choose (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/C): 1 ProblemType: Bug DistroRelease: Ubuntu 17.10 Package: apport 2.20.7-0ubuntu2 ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3 Uname: Linux 4.13.0-12-generic x86_64 ApportVersion: 2.20.7-0ubuntu2 Architecture: amd64 Date: Tue Oct 10 15:21:48 2017 PackageArchitecture: all ProcEnviron: TERM=xterm-256color PATH=(custom, no user) LANG=C.UTF-8 SourcePackage: apport UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1722564/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp