1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 09:08:50 +00:00

Fixing no-assignment issue in _diff_before_write

If content is None, then tmp is never created.
Need to check before calling utils.remove, which does not handle None as its input.
This commit is contained in:
Sam Whitlock
2019-10-21 20:56:44 +02:00
committed by GitHub
parent 8bebf7319d
commit 093faebac2

View File

@@ -422,7 +422,8 @@ class Installer:
tmp = utils.write_to_tmpfile(content)
src = tmp
diff = utils.diff(src, dst, raw=False)
utils.remove(tmp, quiet=True)
if tmp:
utils.remove(tmp, quiet=True)
# fake the output for readability
if not diff: