Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:15.4:ARM
python-FormEncode
new-pycountry.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File new-pycountry.patch of Package python-FormEncode
From: Chris Lamb <lamby@debian.org> Date: Mon, 6 Aug 2018 22:29:58 +0800 Subject: Use "alpha_2" over "alpha2" for compatibility with newer versions of pycountry. --- formencode/national.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/formencode/national.py b/formencode/national.py index a8514ab..5a55fab 100644 --- a/formencode/national.py +++ b/formencode/national.py @@ -85,19 +85,19 @@ elif pycountry: _l = lambda t: gettext.dgettext('iso639', t) def get_countries(): - c1 = set([(e.alpha2, _c(e.name)) for e in pycountry.countries]) + c1 = set([(e.alpha_2, _c(e.name)) for e in pycountry.countries]) ret = c1.union(country_additions + fuzzy_countrynames) return ret def get_country(code): - return _c(pycountry.countries.get(alpha2=code).name) + return _c(pycountry.countries.get(alpha_2=code).name) def get_languages(): - return [(e.alpha2, _l(e.name)) for e in pycountry.languages - if e.name and getattr(e, 'alpha2', None)] + return [(e.alpha_2, _l(e.name)) for e in pycountry.languages + if e.name and getattr(e, 'alpha_2', None)] def get_language(code): - return _l(pycountry.languages.get(alpha2=code).name) + return _l(pycountry.languages.get(alpha_2=code).name) ############################################################
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor