Show More
@@ -22,7 +22,7 b' import os' | |||
|
22 | 22 | import re |
|
23 | 23 | import logging |
|
24 | 24 | import datetime |
|
25 | import ConfigParser | |
|
25 | from pyramid.compat import configparser | |
|
26 | 26 | |
|
27 | 27 | from rhodecode.model.db import Session, User, UserSshKeys |
|
28 | 28 | from rhodecode.model.scm import ScmModel |
@@ -51,7 +51,7 b' class SshWrapper(object):' | |||
|
51 | 51 | self.server_impl = None |
|
52 | 52 | |
|
53 | 53 | def parse_config(self, config_path): |
|
54 |
parser = |
|
|
54 | parser = configparser.ConfigParser() | |
|
55 | 55 | parser.read(config_path) |
|
56 | 56 | return parser |
|
57 | 57 |
@@ -20,7 +20,7 b'' | |||
|
20 | 20 | |
|
21 | 21 | import os |
|
22 | 22 | import pytest |
|
23 | import ConfigParser | |
|
23 | from pyramid.compat import configparser | |
|
24 | 24 | |
|
25 | 25 | from rhodecode.apps.ssh_support.lib.ssh_wrapper import SshWrapper |
|
26 | 26 | from rhodecode.lib.utils2 import AttributeDict |
@@ -28,7 +28,7 b' from rhodecode.lib.utils2 import Attribu' | |||
|
28 | 28 | |
|
29 | 29 | @pytest.fixture |
|
30 | 30 | def dummy_conf_file(tmpdir): |
|
31 |
conf = |
|
|
31 | conf = configparser.ConfigParser() | |
|
32 | 32 | conf.add_section('app:main') |
|
33 | 33 | conf.set('app:main', 'ssh.executable.hg', '/usr/bin/hg') |
|
34 | 34 | conf.set('app:main', 'ssh.executable.git', '/usr/bin/git') |
@@ -19,13 +19,13 b'' | |||
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | 21 | import os |
|
22 | import ConfigParser | |
|
23 | from pyramid.paster import bootstrap as pyramid_bootstrap | |
|
22 | from pyramid.compat import configparser | |
|
23 | from pyramid.paster import bootstrap as pyramid_bootstrap, setup_logging # noqa | |
|
24 | 24 | from pyramid.request import Request |
|
25 | 25 | |
|
26 | 26 | |
|
27 | 27 | def get_config(ini_path, **kwargs): |
|
28 |
parser = |
|
|
28 | parser = configparser.ConfigParser(**kwargs) | |
|
29 | 29 | parser.read(ini_path) |
|
30 | 30 | return parser |
|
31 | 31 | |
@@ -41,7 +41,7 b' def bootstrap(config_uri, request=None, ' | |||
|
41 | 41 | base_url = 'http://rhodecode.local' |
|
42 | 42 | try: |
|
43 | 43 | base_url = config.get('app:main', 'app.base_url') |
|
44 |
except ( |
|
|
44 | except (configparser.NoSectionError, configparser.NoOptionError): | |
|
45 | 45 | pass |
|
46 | 46 | |
|
47 | 47 | request = request or Request.blank('/', base_url=base_url) |
@@ -25,8 +25,8 b' import time' | |||
|
25 | 25 | import platform |
|
26 | 26 | import pkg_resources |
|
27 | 27 | import logging |
|
28 | import string | |
|
29 | 28 | |
|
29 | from pyramid.compat import configparser | |
|
30 | 30 | |
|
31 | 31 | log = logging.getLogger(__name__) |
|
32 | 32 | |
@@ -555,7 +555,6 b' def rhodecode_app_info():' | |||
|
555 | 555 | |
|
556 | 556 | def rhodecode_config(): |
|
557 | 557 | import rhodecode |
|
558 | import ConfigParser as configparser | |
|
559 | 558 | path = rhodecode.CONFIG.get('__file__') |
|
560 | 559 | rhodecode_ini_safe = rhodecode.CONFIG.copy() |
|
561 | 560 |
@@ -24,11 +24,11 b' GIT commit module' | |||
|
24 | 24 | |
|
25 | 25 | import re |
|
26 | 26 | import stat |
|
27 | from ConfigParser import ConfigParser | |
|
28 | 27 | from itertools import chain |
|
29 | 28 | from StringIO import StringIO |
|
30 | 29 | |
|
31 | 30 | from zope.cachedescriptors.property import Lazy as LazyProperty |
|
31 | from pyramid.compat import configparser | |
|
32 | 32 | |
|
33 | 33 | from rhodecode.lib.datelib import utcdate_fromtimestamp |
|
34 | 34 | from rhodecode.lib.utils import safe_unicode, safe_str |
@@ -533,7 +533,7 b' class GitCommit(base.BaseCommit):' | |||
|
533 | 533 | # ConfigParser fails if there are whitespaces |
|
534 | 534 | content = '\n'.join(l.strip() for l in content.split('\n')) |
|
535 | 535 | |
|
536 | parser = ConfigParser() | |
|
536 | parser = configparser.ConfigParser() | |
|
537 | 537 | parser.readfp(StringIO(content)) |
|
538 | 538 | |
|
539 | 539 | for section in parser.sections(): |
General Comments 0
You need to be logged in to leave comments.
Login now