Click does not handle "IP NOT FOUND" error

Bug #1433234 reported by Marco Trevisan (Treviño)
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
click (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When calling http://geoip.ubuntu.com/lookup here, I'm getting:

<?xml version="1.0" encoding="UTF-8"?><Response><Ip>10.172.xxx.xxx</Ip><Status>IP NOT FOUND</Status></Response>

This causes click chroot create with:

 Traceback (most recent call last):
  File "/usr/bin/click", line 86, in <module>
    sys.exit(main())
  File "/usr/bin/click", line 82, in main
    return mod.run(args)
  File "/usr/lib/python3/dist-packages/click/commands/chroot.py", line 266, in run
    return args.func(parser, args)
  File "/usr/lib/python3/dist-packages/click/commands/chroot.py", line 68, in create
    return chroot.create(args.keep_broken_chroot)
  File "/usr/lib/python3/dist-packages/click/chroot.py", line 521, in create
    country_code = get_geoip_country_code_prefix()
  File "/usr/lib/python3/dist-packages/click/chroot.py", line 209, in get_geoip_country_code_prefix
    return et.find("CountryCode").text.lower()+"."
AttributeError: 'NoneType' object has no attribute 'text'

Changed in click (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (35.2 KiB)

This bug was fixed in the package click - 0.4.39

---------------
click (0.4.39) vivid; urgency=low

  [ Marco Trevisan (Treviño) ]
  * handle "IP NOT FOUND" error (LP: #1433234)

  [ Michael Vogt ]
  * switch the default click chroot framework to ubuntu-sdk-14.04

click (0.4.38.5) vivid; urgency=medium

  [ Sebastien Bacher ]
  * Don't try to replace initctl if it's not there (lp: #1430436)

click (0.4.38.4) vivid; urgency=low

  [ Michael Vogt ]
  * lp:~mvo/click/lp1232130-kill-on-remove-2:
    - When uninstalling a app, stop it if its running (LP: #1232130)
  * lp:~mvo/click/dont-crash-for-empty-db:
    - Do not crash when no database configuration is used and
      Click.DB.{get,props.overlay,gc,ensure_ownership} are called.
  * lp:~mvo/click/lp1219912-build-exclude:
    - add a new --ignore option to click {build,buildsource}
      (LP: #1219912)
  * lp:~mvo/click/fix-multiple-framework-validation:
    - fix framework validation for snappy
  * run debian/packagekit-check with "sh" as something in jenkins
    made it mode 0644

  [ CI Train Bot ]
  * New rebuild forced.

click (0.4.37) vivid; urgency=low

  [ Michael Vogt ]
  * lp:~mvo/click/no-error-no-missing-systemctl:
    - fix a spurious error message on systems without systemctl
  * lp:~mvo/click/do-not-crash-in-build-on-broken-symlinks:
    - do not crash when building a click package that contains broken
      symlinks
  * lp:~mvo/click/dpkg-less-verbose:
    - do not show dpkg output on install unless --verbose is used
  * lp:~mvo/click/lp1394256-run-user-hooks:
    - ensures that click user hooks are run for all logged in users when
      click is used with "--all-users".
  * lp:~mvo/click/qt5-qmake-cross-armhf:
    - add qt5-qmake-arm-linux-gnueabihf to chroot (LP: #1393698)
  * lp:~mvo/click/chroot-15.04-multiarch:
    - add ubuntu-sdk-libs-tools and oxide-codecs-extra to the chroot
  * lp:~mvo/click/lp1394256-run-user-hooks-on-remove-too:
    - Run the click remove user hooks for all logged in users.
  * click/chroot.py:
    - use string.format() for chroot TARGET selection
  * skip 0.4.36 version and go straight to 0.4.37 (LP: #1418086)

  [ Zoltan Balogh ]
  * lp:~bzoltan/click/vivid-transition_mirrors:
    - use geoip to guess the most suitable country mirror when creating
      the click chroot

click (0.4.35) vivid; urgency=low

  [ Michael Vogt ]
  * lp:~mvo/click/add-run-shm:
    - Ensure /run/shm is available in a click chroot
  * lp:~mvo/click/ubuntu-core-framework:
    - Add "ubuntu-core-15.04-dev1" click chroot

click (0.4.34.2) vivid; urgency=medium

  [ Michael Vogt ]
  * Demote ubuntu-app-launch-tools from a click recommends to a suggests,
    since they are not needed on server installs.
  * Use dh-systemd to enable click system and user hook integration
    (LP: #1379657).
  * add ubuntu-sdk-15.04 based on ubuntu-sdk-libs/ubuntu-sdk-libs-dev
  * click/tests/preload.h:
    - replace deprecated "Attributes:" with annotations on the
      identifier
  * click/tests/Makefile.am:
    - add --libtool to g-ir-scanner so that it uses the generated
      libtool instead of the system libtool which is now part of
      the libtool-bin package in vivid

  [ Colin Watson ...

Changed in click (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.