Note that for SRUing this fix to 0.13.x, the exception handling syntax
needs to be adapted to Python2, as it was done Python3-style.

** Description changed:

  Binary package hint: checkbox
  
- i'm on the system testing
+ [Impact]
+ network_check crashes when an invalid http_proxy variable is set. Various 
other things would fail if the user has an invalid http_proxy, but this test 
should be robust enough to not crash with an exception in this case.
  
- ProblemType: Crash
- DistroRelease: Ubuntu 11.04
+ The fix  from the development version simply handles the InvalidURL
+ exception thrown, by adding it to an already-present exception-handling
+ block. Essentially we already knew how to handle certain exceptions, and
+ had code for that, but weren't catching InvalidURL.
+ 
+ [Test case]
+ - Run this command:
+ http_proxy='http://whatever.com: text' 
/usr/share/checkbox/scripts/network_check
+ 
+ -Expected result:
+  - A dialog indicating http connection failed 
+ 
+ Actual result: 
+ - Exception stack trace ending with:
+     raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
+ httplib.InvalidURL: nonnumeric port: ' text'
+ 
+ [Regression potential]
+ We're just catching an exception that we weren't before, and it's raised only 
in cases where the given proxy URL *is* invalid. So the potential for 
regressions is virtually none.
+ 
+ ProblemType: CrashDistroRelease: Ubuntu 11.04
  Package: checkbox 0.11.2
  ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
  Uname: Linux 2.6.38-7-generic x86_64
  NonfreeKernelModules: nvidia wl
  Architecture: amd64
  Date: Tue Apr  5 19:28:26 2011
- ExecutablePath: /usr/share/checkbox/scripts/network_check
- InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110330)
+ ExecutablePath: /usr/share/checkbox/scripts/network_checkInstallationMedia: 
Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110330)
  InterpreterPath: /usr/bin/python2.7
  ProcCmdline: /usr/bin/python /usr/share/checkbox/scripts/network_check -a
  ProcEnviron:
-  LANGUAGE=fr_CH:fr:en_GB:en
-  PATH=(custom, no user)
-  LANG=fr_CH.UTF-8
-  SHELL=/bin/bash
- PythonArgs: ['/usr/share/checkbox/scripts/network_check', '-a']
- SourcePackage: checkbox
+  LANGUAGE=fr_CH:fr:en_GB:en
+  PATH=(custom, no user)
+  LANG=fr_CH.UTF-8
+  SHELL=/bin/bash
+ PythonArgs: ['/usr/share/checkbox/scripts/network_check', '-a']SourcePackage: 
checkbox
  Title: network_check crashed with InvalidURL in _set_hostport(): nonnumeric 
port: ' text'
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/751701

Title:
  network_check crashed with InvalidURL in _set_hostport(): nonnumeric
  port: ' text'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/checkbox/+bug/751701/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to