[Git-commits] [grml/grml-x] db26b1: Fix tempfile.NamedTemporaryFile usage under Python 3
Michael Prokop
noreply at github.com
Tue Jul 7 16:22:51 CEST 2020
Branch: refs/heads/master
Home: https://github.com/grml/grml-x
Commit: db26b123e7a5734fa5536a7a0f96ae2d1738b703
https://github.com/grml/grml-x/commit/db26b123e7a5734fa5536a7a0f96ae2d1738b703
Author: Michael Prokop <mika at grml.org>
Date: 2020-07-07 (Tue, 07 Jul 2020)
Changed paths:
M grml-x
Log Message:
-----------
Fix tempfile.NamedTemporaryFile usage under Python 3
The mode parameter of tempfile.NamedTemporaryFile defaults to 'w+b',
see https://docs.python.org/3/library/tempfile.html
Fixes:
| TypeError: a bytes-like object is required, not 'str'
Closes: grml/grml#152
Commit: 2289606cab6f70bd1e9808cfb91cc55a2bd1eaf5
https://github.com/grml/grml-x/commit/2289606cab6f70bd1e9808cfb91cc55a2bd1eaf5
Author: Michael Prokop <mika at grml.org>
Date: 2020-07-07 (Tue, 07 Jul 2020)
Changed paths:
M grml-x
Log Message:
-----------
Do not fail if /etc/X11/xorg.conf already exists
The file() builtin function was removed in Python 3, see
https://docs.python.org/release/3.0/whatsnew/3.0.html#builtins
Fixes:
| NameError: name 'file' is not defined
Commit: af8390f0f9cbd43cdadfa9e274f71edc18ad525a
https://github.com/grml/grml-x/commit/af8390f0f9cbd43cdadfa9e274f71edc18ad525a
Author: Michael Prokop <mika at grml.org>
Date: 2020-07-07 (Tue, 07 Jul 2020)
Changed paths:
M Makefile
M grml-x
A setup.cfg
Log Message:
-----------
Coding style: execute black + isort and integrate flake8, isort + black in build toolchain
Commit: ac9f682344c9065c7e6259020c616166785263de
https://github.com/grml/grml-x/commit/ac9f682344c9065c7e6259020c616166785263de
Author: Michael Prokop <mika at grml.org>
Date: 2020-07-07 (Tue, 07 Jul 2020)
Changed paths:
M grml-x
Log Message:
-----------
Fix flake8 issues
1) Drop unused import (fileinput)
Fixes:
| F401 'fileinput' imported but unused
2) Quoting from https://www.flake8rules.com/rules/E722.html:
| A bare except: clause will catch SystemExit and KeyboardInterrupt
| exceptions, making it harder to interrupt a program with Control-C, and
| can disguise other problems. If you want to catch all exceptions that
| signal program errors, use except Exception: (bare except is equivalent
| to except BaseException:).
Fixes:
| E722 do not use bare except, specify exception instead
3) Quoting from https://www.flake8rules.com/rules/E713.html:
| Tests for membership should use the form x not in the_list rather than
| not x in the_list. The former example is simply more readable.
Fixes:
| E713 test for membership should be 'not in'
Compare: https://github.com/grml/grml-x/compare/366d980fd1f0...ac9f682344c9
More information about the Git-commits
mailing list