diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-04-06 15:08:44 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-04-06 15:08:44 +0300 |
commit | 161cd6ead960ecf6afc05bd583718724140d6973 (patch) | |
tree | 08ebfd2ce661787fabe7cfaf4731ba9e92a0bc93 /yarns/lib.py | |
parent | e34fe17957621386706febab0389d9c00985a611 (diff) | |
download | ick2-161cd6ead960ecf6afc05bd583718724140d6973.tar.gz |
Refactor: use name V instead of vars in yarn implements
vars is a Python builtin, and as such it's not a great name.
Diffstat (limited to 'yarns/lib.py')
-rw-r--r-- | yarns/lib.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/yarns/lib.py b/yarns/lib.py index f3ac9d9..290512c 100644 --- a/yarns/lib.py +++ b/yarns/lib.py @@ -1,4 +1,4 @@ -# Copyright 2017-2018 Lars Wirzenius +# Copyright 2017-2019 Lars Wirzenius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -32,7 +32,7 @@ from yarnutils import * srcdir = os.environ['SRCDIR'] datadir = os.environ['DATADIR'] -vars = Variables(datadir) +V = Variables(datadir) def random_free_port(): @@ -101,12 +101,12 @@ def get_token(user): return cat(filename) -def http(vars, func, url, **kwargs): +def http(V, func, url, **kwargs): status, content_type, headers, body = func(url, **kwargs) - vars['status_code'] = status - vars['content_type'] = content_type - vars['headers'] = headers - vars['body'] = body + V['status_code'] = status + V['content_type'] = content_type + V['headers'] = headers + V['body'] = body def get(url, token): |