Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.4
python.370
python-2.7-fix-UTF-arguments.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-2.7-fix-UTF-arguments.patch of Package python.370
# HG changeset patch # User R. David Murray <rdmurray@bitdance.com> # Date 1278345965 0 # Node ID 705869d1bdf0fda211f099c1d4259652f4ad3f50 # Parent e84d5164414460a36fff780c27f7324859612b67 #9161: Fix regression in acceptance of unicode strings in add_option calls. The original change in 2.6 was made during rc1 changeover, and did not get ported to 2.7. The original change may not even have been intentional, but if so it doesn't seem to have caused any problems. diff --git a/Lib/optparse.py b/Lib/optparse.py --- a/Lib/optparse.py +++ b/Lib/optparse.py @@ -1008,7 +1008,7 @@ class OptionContainer: """add_option(Option) add_option(opt_str, ..., kwarg=val, ...) """ - if type(args[0]) is types.StringType: + if type(args[0]) in types.StringTypes: option = self.option_class(*args, **kwargs) elif len(args) == 1 and not kwargs: option = args[0]
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