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
# write new config
if monitor or device or len(screen.data) > 0 or screen.subsect != '':
try:
- f = tempfile.NamedTemporaryFile(delete=False)
+ f = tempfile.NamedTemporaryFile(mode='w+', delete=False)
f.write(XORG_CONF_HEADER + "\n")
f.write("# DO NOT MODIFY, YOUR CHANGES WILL BE LOST - OR REMOVE ALL HEADER LINES\n")
f.write("# See man xorg.conf or /etc/X11/xorg.conf.example for more\n")