diff options
| author | Thibault Delavallée <tde@openerp.com> | 2014-04-01 11:28:26 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2014-04-01 11:28:26 +0200 |
| commit | e29e6dfe2652d689a541fa4e58b8c8deaec4dc47 (patch) | |
| tree | ca147a3f7de2b532ac4598bc40670c85cd9285a0 | |
| parent | 6a4e52f2725ac976397dbfaf081ba7b447e39370 (diff) | |
[CLEAN] website_blog :code cleaning in added code
bzr revid: tde@openerp.com-20140401092826-gf9f365bn4wu8mk3
| -rw-r--r-- | addons/website_blog/controllers/main.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index aeecaaa871a..522976410ab 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -38,8 +38,7 @@ class QueryURL(object): self.path_args = set(path_args or []) def __call__(self, path=None, path_args=None, **kw): - if not path: - path = self.path + path = path or self.path for k, v in self.args.items(): kw.setdefault(k, v) path_args = set(path_args or []).union(self.path_args) @@ -55,9 +54,8 @@ class QueryURL(object): fragments.append(werkzeug.url_encode([(key, item) for item in value])) else: fragments.append(werkzeug.url_encode([(key, value)])) - if paths: - for key, value in paths: - path += '/' + key + '/%s' % value + for key, value in paths: + path += '/' + key + '/%s' % value if fragments: path += '?' + '&'.join(fragments) return path |
