Merge lp:~freyes/ubuntu/precise/serverstack-dns/index-out-of-range into lp:~openstack-charmers/ubuntu/precise/serverstack-dns/trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~freyes/ubuntu/precise/serverstack-dns/index-out-of-range |
Merge into: | lp:~openstack-charmers/ubuntu/precise/serverstack-dns/trunk |
Diff against target: |
14 lines (+4/-0) 1 file modified
serverstack-tenant-dns (+4/-0) |
To merge this branch: | bzr merge lp:~freyes/ubuntu/precise/serverstack-dns/index-out-of-range |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenStack Charmers | Pending | ||
Review via email: mp+305631@code.launchpad.net |
Description of the change
Skip empty lines when iterating hosts file
If the hosts file contains empty lines a list index out of range exception
is raised
Traceback (most recent call last):
File "/usr/bin/
File "/usr/bin/
File "/usr/bin/
hn = _hostname[1]
IndexError: list index out of range
Unmerged revisions
- 17. By Felipe Reyes
-
Skip empty lines when iterating hosts file
If the hosts file contains empty lines a list index out of range exception
is raisedTraceback (most recent call last):
File "/usr/bin/serverstack- tenant- dns", line 256, in <module>
add_current_ instances( )
File "/usr/bin/serverstack- tenant- dns", line 144, in add_current_ instances
add_host_entry( hostname, ip_addr, "")
File "/usr/bin/serverstack- tenant- dns", line 81, in add_host_entry
hn = _hostname[1]
IndexError: list index out of range