Skip to content

Commit

Permalink
Remove remaining c['www']['url']
Browse files Browse the repository at this point in the history
This removes all the occurrences of ['www']['url'] after commit b53998a
  • Loading branch information
vrutkovs committed Dec 5, 2014
1 parent 845ad50 commit 2d594c1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions master/buildbot/test/integration/test_www.py
Expand Up @@ -76,7 +76,6 @@ def setUp(self):
port='tcp:0:interface=127.0.0.1',
debug=True,
auth=auth.NoAuth(),
url="not yet known",
avatar_methods=[],
logfileName='http.log')
master.www = wwwservice.WWWService(master)
Expand All @@ -87,7 +86,7 @@ def setUp(self):
# the config. The second reconfig isn't really required, but doesn't
# hurt.
self.url = 'http://127.0.0.1:%d/' % master.www.getPortnum()
master.config.www['url'] = self.url
master.config.buildbotURL = self.url
yield master.www.reconfigServiceWithBuildbotConfig(master.config)

self.master = master
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/www/avatar.py
Expand Up @@ -47,7 +47,7 @@ class AvatarResource(resource.Resource):

def reconfigResource(self, new_config):
self.avatarMethods = new_config.www.get('avatar_methods', [])
self.defaultAvatarFullUrl = urljoin(new_config.www['url'], self.defaultAvatarUrl)
self.defaultAvatarFullUrl = urljoin(new_config.buildbotURL, self.defaultAvatarUrl)
self.cache = {}
# ensure the avatarMethods is a iterable
if isinstance(self.avatarMethods, AvatarBase):
Expand Down
4 changes: 2 additions & 2 deletions master/buildbot/www/oauth2.py
Expand Up @@ -69,8 +69,8 @@ def __init__(self,

def reconfigAuth(self, master, new_config):
self.master = master
self.loginUri = join(new_config.www['url'], "auth/login")
self.homeUri = new_config.www['url']
self.loginUri = join(new_config.buildbotURL, "auth/login")
self.homeUri = new_config.buildbotURL

def getConfigDict(self):
return dict(name=self.name,
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/www/resource.py
Expand Up @@ -39,7 +39,7 @@ class Resource(resource.Resource):

@property
def base_url(self):
return self.master.config.www['url']
return self.master.config.buildbotURL

def __init__(self, master):
resource.Resource.__init__(self)
Expand Down
4 changes: 2 additions & 2 deletions master/buildbot/www/rest.py
Expand Up @@ -374,8 +374,8 @@ def writeError(msg, errcode=404, jsonrpccode=None):
request.write(data)

def reconfigResource(self, new_config):
# www['url'] will always ends with a '/', not the Origin header.
origin_self = new_config.www['url'].rstrip('/')
# buildbotURL will always ends with a '/', not the Origin header.
origin_self = new_config.buildbotURL.rstrip('/')
# pre-translate the origin entries in the config
self.origins = [re.compile(fnmatch.translate(o.lower()))
for o in new_config.www.get('allowed_origins',
Expand Down

0 comments on commit 2d594c1

Please sign in to comment.