Mercurial > hg
diff mercurial/hgweb/webutil.py @ 37694:d14dbf46e5c7
hgweb: prefix private variables of sessionvars with '_'
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 01 Apr 2018 23:03:02 +0900 |
parents | 8a5ee6aa8870 |
children | 570a4426c5b8 |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Fri Apr 13 16:32:33 2018 -0400 +++ b/mercurial/hgweb/webutil.py Sun Apr 01 23:03:02 2018 +0900 @@ -653,17 +653,17 @@ class sessionvars(object): def __init__(self, vars, start='?'): - self.start = start - self.vars = vars + self._start = start + self._vars = vars def __getitem__(self, key): - return self.vars[key] + return self._vars[key] def __setitem__(self, key, value): - self.vars[key] = value + self._vars[key] = value def __copy__(self): - return sessionvars(copy.copy(self.vars), self.start) + return sessionvars(copy.copy(self._vars), self._start) def __iter__(self): - separator = self.start - for key, value in sorted(self.vars.iteritems()): + separator = self._start + for key, value in sorted(self._vars.iteritems()): yield {'name': key, 'value': pycompat.bytestr(value), 'separator': separator,