Show More
@@ -22,7 +22,6 b' import sys' | |||
|
22 | 22 | import fnmatch |
|
23 | 23 | |
|
24 | 24 | import decorator |
|
25 | import typing | |
|
26 | 25 | import venusian |
|
27 | 26 | from collections import OrderedDict |
|
28 | 27 | |
@@ -45,7 +44,7 b' from rhodecode.model.db import User, Use' | |||
|
45 | 44 | log = logging.getLogger(__name__) |
|
46 | 45 | |
|
47 | 46 | DEFAULT_RENDERER = 'jsonrpc_renderer' |
|
48 |
DEFAULT_URL = '/_admin/api |
|
|
47 | DEFAULT_URL = '/_admin/api' | |
|
49 | 48 | SERVICE_API_IDENTIFIER = 'service_' |
|
50 | 49 | |
|
51 | 50 |
@@ -26,13 +26,13 b' import logging.config' | |||
|
26 | 26 | from paste.gzipper import make_gzip_middleware |
|
27 | 27 | import pyramid.events |
|
28 | 28 | from pyramid.wsgi import wsgiapp |
|
29 | from pyramid.authorization import ACLAuthorizationPolicy | |
|
30 | 29 | from pyramid.config import Configurator |
|
31 | 30 | from pyramid.settings import asbool, aslist |
|
32 | 31 | from pyramid.httpexceptions import ( |
|
33 | 32 | HTTPException, HTTPError, HTTPInternalServerError, HTTPFound, HTTPNotFound) |
|
34 | 33 | from pyramid.renderers import render_to_response |
|
35 | 34 | |
|
35 | from rhodecode import api | |
|
36 | 36 | from rhodecode.model import meta |
|
37 | 37 | from rhodecode.config import patches |
|
38 | 38 | from rhodecode.config import utils as config_utils |
@@ -527,7 +527,7 b' def sanitize_settings_and_apply_defaults' | |||
|
527 | 527 | |
|
528 | 528 | # TODO: johbo: Re-think this, usually the call to config.include |
|
529 | 529 | # should allow to pass in a prefix. |
|
530 |
settings_maker.make_setting('rhodecode.api.url', |
|
|
530 | settings_maker.make_setting('rhodecode.api.url', api.DEFAULT_URL) | |
|
531 | 531 | |
|
532 | 532 | # Sanitize generic settings. |
|
533 | 533 | settings_maker.make_setting('default_encoding', 'UTF-8', parser='list') |
@@ -837,7 +837,13 b' def call_service_api(ini_path, payload):' | |||
|
837 | 837 | "Please ensure that app.service_api.host and app.service_api.token are " |
|
838 | 838 | "defined inside of .ini configuration file." |
|
839 | 839 | ) |
|
840 | try: | |
|
840 | 841 | api_url = config.get('app:main', 'rhodecode.api.url') |
|
842 | except NoOptionError: | |
|
843 | from rhodecode import api | |
|
844 | log.debug('Cannot find rhodecode.api.url, setting API URL TO Default value') | |
|
845 | api_url = api.DEFAULT_URL | |
|
846 | ||
|
841 | 847 | payload.update({ |
|
842 | 848 | 'id': 'service', |
|
843 | 849 | 'auth_token': config.get('app:main', 'app.service_api.token') |
General Comments 0
You need to be logged in to leave comments.
Login now