diff options
author | Magnus Hagander | 2022-07-15 08:57:21 +0000 |
---|---|---|
committer | Magnus Hagander | 2022-07-15 09:02:34 +0000 |
commit | 50657317b99b8fea03aaa801bf81523ec0e66232 (patch) | |
tree | aa688293d0b9222c99fac170f1138201561cf580 /tools/deploystatic/deploystatic.py | |
parent | e18a3142e76faee7761b5fab863c722257ccaf40 (diff) |
Rename instances of variables "l"
This is complained about more loudly in newer versions of pycodestyle,
and it's a bad idea in general. So rename them all to something more
readable.
Diffstat (limited to 'tools/deploystatic/deploystatic.py')
-rwxr-xr-x | tools/deploystatic/deploystatic.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/deploystatic/deploystatic.py b/tools/deploystatic/deploystatic.py index 1398d337..557f7f02 100755 --- a/tools/deploystatic/deploystatic.py +++ b/tools/deploystatic/deploystatic.py @@ -39,13 +39,13 @@ def filter_groupby_sort(objects, keyfield, sortkey): # Shuffle the order in a list, for example to randomize the order of sponsors -def filter_shuffle(l): +def filter_shuffle(thelist): try: - r = list(l) + r = list(thelist) random.shuffle(r) return r except Exception as e: - return l + return thelist # Format a datetime. If it's a datetime, call strftime. If it's a @@ -387,8 +387,8 @@ if __name__ == "__main__": # parsing everything. fmap = source.readfile('templates/pages/.deploystaticmap') if fmap: - for l in fmap.splitlines(): - (src, dest) = l.decode('utf8').split(':') + for line in fmap.splitlines(): + (src, dest) = line.decode('utf8').split(':') if not os.path.isdir(os.path.join(args.destpath, dest)): os.makedirs(os.path.join(args.destpath, dest)) context['page'] = dest |