← Back to team overview

touch-packages team mailing list archive

[Bug 1433234] [NEW] Click does not handle "IP NOT FOUND" error

 

Public bug reported:

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'

** Affects: click (Ubuntu)
     Importance: Undecided
         Status: In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to click in Ubuntu.
https://bugs.launchpad.net/bugs/1433234

Title:
  Click does not handle "IP NOT FOUND" error

Status in click package in Ubuntu:
  In Progress

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'

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


Follow ups

References