[PATCH] Xspice: initialize variable before use

Timo Juhani Lindfors timo.lindfors at iki.fi
Mon Oct 30 19:08:35 UTC 2017


This fixes the runtime error:

Traceback (most recent call last):
  File "/usr/bin/Xspice", line 277, in <module>
    if not temp_dir:
NameError: name 'temp_dir' is not defined

Signed-off-by: Timo Juhani Lindfors <timo.lindfors at iki.fi>
---
 scripts/Xspice | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Xspice b/scripts/Xspice
index 927dcb1..80b6ebb 100755
--- a/scripts/Xspice
+++ b/scripts/Xspice
@@ -210,6 +210,8 @@ def launch(*args, **kw):
 signal.signal(signal.SIGTERM, cleanup)
 atexit.register(cleanup)
 
+temp_dir = None
+
 if args.auto:
     temp_dir = tempfile.mkdtemp(prefix="Xspice-")
     cleanup_dirs.append(temp_dir)
-- 
2.11.0



More information about the xorg-devel mailing list