Mercurial > libervia-web
changeset 924:94f88277c2e7
libervia (pages): getSessionData return one session if used with one argument, else an iterator
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 03 Apr 2017 01:00:29 +0200 |
parents | edb322c87ea4 |
children | e00151140f77 |
files | src/server/server.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/server/server.py Mon Apr 03 01:00:29 2017 +0200 +++ b/src/server/server.py Mon Apr 03 01:00:29 2017 +0200 @@ -1903,7 +1903,10 @@ @return (iterator(data)): requested session data """ session = request.getSession() - return (iface(session) for iface in args) + if len(args) == 1: + return args[0](session) + else: + return (iface(session) for iface in args) ## TLS related methods ##