Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
No build reason found for standard:s390x
openSUSE:Backports:SLE-15-SP5
python-bugzillatools
no-bzrlib-py3k.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File no-bzrlib-py3k.patch of Package python-bugzillatools
--- a/plugin-bzr/__init__.py +++ b/plugin-bzr/__init__.py @@ -91,34 +91,36 @@ a bug URL and status in the revision met bzr commit -m 'fix bug 123' --fixes example:123 """ +import sys -import bzrlib.api -import bzrlib.commands -import bzrlib.trace - -import bzlib - -from . import hooks - -# plugin setup -version_info = bzlib.version_info - -COMPATIBLE_BZR_VERSIONS = [ - (2, 0, 0), - (2, 1, 0), - (2, 2, 0), - (2, 3, 0), -] - -bzrlib.api.require_any_api(bzrlib, COMPATIBLE_BZR_VERSIONS) - -if __name__ != 'bzrlib.plugins.bugzillatools': - bzrlib.trace.warning( - 'Not running as bzrlib.plugins.bugzillatools; things may break.') - -# install the get_command hook -bzrlib.commands.Command.hooks.install_named_hook( - 'get_command', - hooks.get_command_hook, - 'bugzilla plugin - extend cmd_commit' -) +if sys.version_info[0] == 2: + import bzrlib.api + import bzrlib.commands + import bzrlib.trace + + import bzlib + + from . import hooks + + # plugin setup + version_info = bzlib.version_info + + COMPATIBLE_BZR_VERSIONS = [ + (2, 0, 0), + (2, 1, 0), + (2, 2, 0), + (2, 3, 0), + ] + + bzrlib.api.require_any_api(bzrlib, COMPATIBLE_BZR_VERSIONS) + + if __name__ != 'bzrlib.plugins.bugzillatools': + bzrlib.trace.warning( + 'Not running as bzrlib.plugins.bugzillatools; things may break.') + + # install the get_command hook + bzrlib.commands.Command.hooks.install_named_hook( + 'get_command', + hooks.get_command_hook, + 'bugzilla plugin - extend cmd_commit' + ) --- a/bzlib/config.py +++ b/bzlib/config.py @@ -40,7 +40,7 @@ def check_section(section): raise ConfigError('invalid section: {}'.format(section)) -class Config(ConfigParser.SafeConfigParser): +class Config(ConfigParser.ConfigParser): _instances = {} @classmethod @@ -52,16 +52,16 @@ class Config(ConfigParser.SafeConfigPars def __init__(self, path): path = os.path.expanduser(path) - ConfigParser.SafeConfigParser.__init__(self) + ConfigParser.ConfigParser.__init__(self) self._path = path self.read(self._path) def write(self): with open(self._path, 'w') as fp: - ConfigParser.SafeConfigParser.write(self, fp) + ConfigParser.ConfigParser.write(self, fp) def add_section(self, section): - ConfigParser.SafeConfigParser.add_section(self, check_section(section)) + ConfigParser.ConfigParser.add_section(self, check_section(section)) NoSectionError = ConfigParser.NoSectionError
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