From 933d5bdd4681d7abfc59851a4a6318b5146ff80c Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 5 Sep 2011 00:50:23 -0400 Subject: [PATCH] Test if math directory exists, to future proof 1.18.0. Signed-off-by: Edward Z. Yang --- wizard/app/mediawiki.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wizard/app/mediawiki.py b/wizard/app/mediawiki.py index 93fee83..01cfcaf 100644 --- a/wizard/app/mediawiki.py +++ b/wizard/app/mediawiki.py @@ -61,8 +61,9 @@ class Application(app.Application): self.install_old(options) def install_1_17_0(self, options): util.soft_unlink("LocalSettings.php") - with util.ChangeDirectory("math"): - shell.call("make") + if os.path.exists("math"): + with util.ChangeDirectory("math"): + shell.call("make") try: result = shell.eval( "php", "maintenance/install.php", @@ -117,8 +118,9 @@ class Application(app.Application): def upgrade(self, d, version, options): if not os.path.isfile("AdminSettings.php"): shell.call("git", "checkout", "-q", "mediawiki-" + str(version), "--", "AdminSettings.php") - with util.ChangeDirectory("math"): - shell.call("make") + if os.path.exists("math"): + with util.ChangeDirectory("math"): + shell.call("make") try: result = shell.eval("php", "maintenance/update.php", "--quick", log=True) except shell.CallError as e: -- 2.45.0