mdwsetup.py: Fix unbound variable reference in error case.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 8 May 2020 11:24:18 +0000 (12:24 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 May 2020 11:24:18 +0000 (12:24 +0100)
This is debris from f74ba2bb507cfeadd5518d5468c7ab7281b581b7 which
changed a function into a class, and the `source' argument into (a) a
list and (b) an instance variable.  Fix this reference which should have
changed along with the rest.

mdwsetup.py

index 94bce8a..6acbdb6 100644 (file)
@@ -181,7 +181,7 @@ class Generate (BaseGenFile):
     temp = me.target + '.new'
     with open(temp, 'w') as ft:
       rc = SUB.call([SYS.executable, me.sources[0]], stdout = ft)
-    if rc != 0: raise SubprocessFailure, (source, rc)
+    if rc != 0: raise SubprocessFailure, (me.sources[0], rc)
     OS.rename(temp, me.target)
 
 ## Backward compatibility.