From 161cd6ead960ecf6afc05bd583718724140d6973 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 6 Apr 2019 15:08:44 +0300 Subject: Refactor: use name V instead of vars in yarn implements vars is a Python builtin, and as such it's not a great name. --- yarns/lib.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'yarns/lib.py') 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): -- cgit v1.2.1