[U-Boot,45/53] patman: Reset the output directory when it is removed
diff mbox series

Message ID 20190720182416.183626-46-sjg@chromium.org
State Accepted
Commit 313533018dc175a5552a8ccac9d6bcd780e824df
Delegated to: Simon Glass
Headers show
Series
  • binman: Support replacing entries in an existing image
Related show

Commit Message

Simon Glass July 20, 2019, 6:24 p.m. UTC
At present outdir remains set ever after the output directory has been
removed. Fix this to avoid trying to access it when it is not present.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/patman/tools.py | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass July 29, 2019, 9:22 p.m. UTC | #1
At present outdir remains set ever after the output directory has been
removed. Fix this to avoid trying to access it when it is not present.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/patman/tools.py | 2 ++
 1 file changed, 2 insertions(+)

Applied to u-boot-dm, thanks!

Patch
diff mbox series

diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index d615227482a..0d4705db760 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -83,6 +83,7 @@  def FinaliseOutputDir():
     """Tidy up: delete output directory if temporary and not preserved."""
     if outdir and not preserve_outdir:
         _RemoveOutputDir()
+        outdir = None
 
 def GetOutputFilename(fname):
     """Return a filename within the output directory.
@@ -101,6 +102,7 @@  def _FinaliseForTest():
 
     if outdir:
         _RemoveOutputDir()
+        outdir = None
 
 def SetInputDirs(dirname):
     """Add a list of input directories, where input files are kept.