Revert all changes to m-p at the end
This commit is contained in:
parent
3be7835c34
commit
870ca5f9a0
@ -108,16 +108,11 @@ class CB:
|
|||||||
self.lock_file.close()
|
self.lock_file.close()
|
||||||
return
|
return
|
||||||
|
|
||||||
def unlink(path) -> None:
|
# check directory exists for test: work dir deleted to early
|
||||||
try:
|
if (self.work_dir / 'mkimage-profiles' / '.git').exists():
|
||||||
os.unlink(path)
|
os.chdir(self.work_dir / 'mkimage-profiles')
|
||||||
except FileNotFoundError:
|
subprocess.run(['git', 'reset', '--hard'])
|
||||||
pass
|
subprocess.run(['git', 'clean', '-fdx'])
|
||||||
|
|
||||||
for name in self.created_scripts:
|
|
||||||
unlink(name)
|
|
||||||
unlink(self.work_dir / f'mkimage-profiles/conf.d/{PROG}.mk')
|
|
||||||
|
|
||||||
os.chdir(self._save_cwd)
|
os.chdir(self._save_cwd)
|
||||||
try:
|
try:
|
||||||
self.info(f'Finish {PROG}')
|
self.info(f'Finish {PROG}')
|
||||||
|
Loading…
Reference in New Issue
Block a user