[Bug 1262528] Re: ubiquity crash when hostname is too long
Bin Li
1262528 at bugs.launchpad.net
Thu Dec 19 07:34:38 UTC 2013
Here is the patch to fix the check_hostname function.
** Patch added: "check_hostname.patch"
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1262528/+attachment/3932410/+files/check_hostname.patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1262528
Title:
ubiquity crash when hostname is too long
Status in “ubiquity” package in Ubuntu:
New
Bug description:
Here is the trace log in precise-updates.
Exception in GTK frontend (invoking crash handler):
Traceback (most recent call last):
File "/usr/lib/ubiquity/plugins/ubi-usersetup.py", line 394, in info_loop
self.hostname_error(make_error_string(self.controller, errors))
File "/usr/lib/ubiquity/plugins/ubi-usersetup.py", line 69, in make_error_string
return "\n".join([controller.get_string(error) for error in errors])
TypeError: sequence item 0: expected string, NoneType found.
After dig the source code I found the error was set wrong, without
prefix 'ubiquity/text/', so that when use controller.get_string() it
can't find the correct name and return None, after that the installer
crash.
=== modified file 'ubiquity/plugins/ubi-usersetup.py'
--- ubiquity/plugins/ubi-usersetup.py 2012-09-25 22:34:33 +0000
+++ ubiquity/plugins/ubi-usersetup.py 2013-12-19 07:30:34 +0000
@@ -42,13 +42,13 @@
errors = []
for result in validation.check_hostname(misc.utf8(hostname)):
if result == validation.HOSTNAME_LENGTH:
- errors.append('hostname_error_length')
+ errors.append('ubiquity/text/hostname_error_length')
elif result == validation.HOSTNAME_BADCHAR:
- errors.append('hostname_error_badchar')
+ errors.append('ubiquity/text/hostname_error_badchar')
elif result == validation.HOSTNAME_BADHYPHEN:
- errors.append('hostname_error_badhyphen')
+ errors.append('ubiquity/text/hostname_error_badhyphen')
elif result == validation.HOSTNAME_BADDOTS:
- errors.append('hostname_error_baddots')
+ errors.append('ubiquity/text/hostname_error_baddots')
return errors
def check_username(username):
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1262528/+subscriptions
More information about the foundations-bugs
mailing list