From 2318a2f71d00c86e567afa45116f93b36138ecaf Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 19 Apr 2020 10:18:35 +0000 Subject: [PATCH] xml-rewrite-2.py: Restore call to os.chdir() to restore previous working directory. os.chdir(cwd) was lost in commit c5a30f5dc7a54d81714a30f7f8140347db173e8f. Bug: https://bugs.gentoo.org/698964 Signed-off-by: Arfrever Frehtes Taifersar Arahesis --- src/py/xml-rewrite-2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/py/xml-rewrite-2.py b/src/py/xml-rewrite-2.py index c56de1d..4035119 100755 --- a/src/py/xml-rewrite-2.py +++ b/src/py/xml-rewrite-2.py @@ -375,6 +375,8 @@ parameters will break the script.""" else: rewriter.process(f) + os.chdir(cwd) + # Then write it back out to the file with open(file, 'w') as f: rewriter.write(f) -- 2.26.0