From 8e39098b71a266f96a447e85c1f4bdd558a14fe5 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 10 Apr 2015 17:48:48 +0530 Subject: [PATCH] Added checks for HHVM and Pagespeed update --- ee/cli/plugins/site.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index ef34ba6c..39dcc463 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -329,6 +329,9 @@ class EESiteCreateController(CementBaseController): if stype == 'wpsubdir': data['wpsubdir'] = True + if stype == "html" and self.app.pargs.hhvm: + Log.error(self, "Can not create HTML site with HHVM") + if data and self.app.pargs.hhvm: data['hhvm'] = True hhvm = 1 @@ -677,6 +680,22 @@ class EESiteUpdateController(CementBaseController): data['pagespeed'] = False pagespeed = 0 + if pagespeed == old_pagespeed: + if pagespeed == 0: + Log.error(self, "Pagespeed is allready disabled for given " + "site") + elif pagespeed == 1: + Log.error(self, "Pagespeed is allready enabled for given " + "site") + + if hhvm == old_hhvm: + if hhvm == 0: + Log.error(self, "HHVM is allready disabled for given " + "site") + elif hhvm == 1: + Log.error(self, "HHVM is allready enabled for given " + "site") + if data and (not self.app.pargs.hhvm): if old_hhvm == 1: data['hhvm'] = True @@ -696,7 +715,7 @@ class EESiteUpdateController(CementBaseController): if not data: Log.error(self, " Cannot update {0}, Invalid Options" .format(ee_domain)) - + ee_auth = site_package_check(self, stype) sitebackup(self, data)