Merge lp:~sbaldassin/ubuntu-system-tests/fix_config into lp:ubuntu-system-tests

Proposed by Santiago Baldassin
Status: Work in progress
Proposed branch: lp:~sbaldassin/ubuntu-system-tests/fix_config
Merge into: lp:ubuntu-system-tests
Diff against target: 15 lines (+4/-1)
1 file modified
ubuntu_system_tests/common/config.py (+4/-1)
To merge this branch: bzr merge lp:~sbaldassin/ubuntu-system-tests/fix_config
Reviewer Review Type Date Requested Status
platform-qa-bot continuous-integration Needs Fixing
prod-platform-qa continuous-integration Pending
Canonical Platform QA Team Pending
Review via email: mp+310763@code.launchpad.net

Commit message

Returning an empty string when no value is found in the config options and nothing is enter as input

Description of the change

Returning an empty string when a config value is not found in the config options and nothing is enter as input

To post a comment you must log in.
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

479. By Santiago Baldassin

Fixing config

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_system_tests/common/config.py'
2--- ubuntu_system_tests/common/config.py 2016-11-08 19:28:21 +0000
3+++ ubuntu_system_tests/common/config.py 2016-11-14 12:01:23 +0000
4@@ -370,7 +370,10 @@
5
6 def _get_value_from_user_or_default(self, option):
7 """Return value from stdin or default value if no stdin value."""
8- return input() or option.default
9+ try:
10+ return input() or option.default
11+ except EOFError:
12+ return ""
13
14 def get_autopilot_config_string(self):
15 """Return the configuration in a string usable by Autopilot.

Subscribers

People subscribed via source and target branches