[jhbuild] Don't crash when the user removes builddir in the shell
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] Don't crash when the user removes builddir in the shell
- Date: Sat, 21 Apr 2018 14:20:13 +0000 (UTC)
commit 154ce025a6431a348f44827cd37c8da83327c00f
Author: Ting-Wei Lan <lantw src gnome org>
Date: Sat Apr 21 16:55:51 2018 +0800
Don't crash when the user removes builddir in the shell
It is sometimes necessary to remove the entire builddir in order to fix
the build. When the user does this, JHBuild will fail to remove the
symlink it created and the unlink call will fail and throw an exception.
https://bugzilla.gnome.org/show_bug.cgi?id=795431
jhbuild/frontends/terminal.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/frontends/terminal.py b/jhbuild/frontends/terminal.py
index 37e498d..9b7552d 100644
--- a/jhbuild/frontends/terminal.py
+++ b/jhbuild/frontends/terminal.py
@@ -371,7 +371,10 @@ class TerminalBuildScript(buildscript.BuildScript):
uprint(_('exit shell to continue with build'))
os.system(user_shell)
if unlink_srcdir:
- os.unlink('.jhbuild-srcdir')
+ try:
+ os.unlink('.jhbuild-srcdir')
+ except OSError:
+ pass
os.chdir(cwd) # restor working directory
elif val == '5':
self.config.reload()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]