Fall back to empty strings for suffixes in make_tempfile().
`tempfile.NamedTemporaryFile` does not allow `None` values for `suffix`.
We now pass in an empty string in this situation, which is what it
expects.
This fixes compatibility issues with some versions of Python, and is a
trivial change.
@@ -91,7 +91,7 @@ def make_tempfile(content=None, prefix='rbtools.', suffix=None, filename=None):
fp.write(content)
else:
with tempfile.NamedTemporaryFile(prefix=prefix,
- suffix=suffix,
+ suffix=suffix or '',
delete=False) as fp:
tmpfile = fp.name
