Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jayvdb:py-backports
python-iniparse
python-iniparse-no-python2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-iniparse-no-python2.patch of Package python-iniparse
diff --git a/iniparse/configparser.py b/iniparse/configparser.py index c543d50..e39fe63 100644 --- a/iniparse/configparser.py +++ b/iniparse/configparser.py @@ -1,7 +1,2 @@ -try: - from ConfigParser import * - # not all objects get imported with __all__ - from ConfigParser import Error, InterpolationMissingOptionError -except ImportError: - from configparser import * - from configparser import Error, InterpolationMissingOptionError +from configparser import * +from configparser import Error, InterpolationMissingOptionError diff --git a/runtests.py b/runtests.py index 53a723d..1619714 100755 --- a/runtests.py +++ b/runtests.py @@ -1,12 +1,8 @@ #!/usr/bin/env python -import sys import tests + if __name__ == '__main__': - if len(sys.argv) == 2 and sys.argv[1] == '-g': - import unittestgui - unittestgui.main('tests.Suite') - else: - import unittest - unittest.main(defaultTest='tests.Suite') + import unittest + unittest.main(defaultTest='tests.Suite') diff --git a/tests/test_compat.py b/tests/test_compat.py index 253ac40..8d7c785 100644 --- a/tests/test_compat.py +++ b/tests/test_compat.py @@ -6,11 +6,7 @@ import collections as UserDict import unittest -import sys -if sys.version_info[0] < 3: - from test import test_support -else: - from test import support as test_support +from test import support as test_support class SortedDict(UserDict.UserDict): @@ -264,13 +260,6 @@ class mystr(str): cf.set("sect", "option1", mystr("splat")) cf.set("sect", "option2", "splat") cf.set("sect", "option2", mystr("splat")) - try: - unicode - except NameError: - pass - else: - cf.set("sect", "option1", unicode("splat")) - cf.set("sect", "option2", unicode("splat")) def test_read_returns_file_list(self): file1 = test_support.findfile("cfgparser.1")
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