diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index af5f5916..9d190384 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -668,51 +668,51 @@ class EESiteUpdateController(CementBaseController): if self.app.pargs.hhvm != 'off': data['hhvm'] = True - hhvm = 1 + hhvm = True elif self.app.pargs.hhvm == 'off': data['hhvm'] = False - hhvm = 0 + hhvm = False if self.app.pargs.pagespeed != 'off': data['pagespeed'] = True - pagespeed = 1 + pagespeed = True elif self.app.pargs.pagespeed == 'off': data['pagespeed'] = False - pagespeed = 0 + pagespeed = False if self.app.pargs.pagespeed: if pagespeed == old_pagespeed: - if pagespeed == 0: + if pagespeed is False: Log.error(self, "Pagespeed is allready disabled for given " "site") - elif pagespeed == 1: + elif pagespeed is True: Log.error(self, "Pagespeed is allready enabled for given " "site") if self.app.pargs.hhvm: if hhvm == old_hhvm: - if hhvm == 0: + if hhvm is False: Log.error(self, "HHVM is allready disabled for given " "site") - elif hhvm == 1: + elif hhvm is True: Log.error(self, "HHVM is allready enabled for given " "site") if data and (not self.app.pargs.hhvm): - if old_hhvm == 1: + if old_hhvm is True: data['hhvm'] = True - hhvm = 1 + hhvm = True else: data['hhvm'] = False - hhvm = 0 + hhvm = False if data and (not self.app.pargs.pagespeed): - if old_pagespeed == 1: + if old_pagespeed is True: data['pagespeed'] = True - pagespeed = 1 + pagespeed = True else: data['pagespeed'] = False - pagespeed = 0 + pagespeed = False if not data: Log.error(self, " Cannot update {0}, Invalid Options" diff --git a/ee/cli/plugins/sitedb.py b/ee/cli/plugins/sitedb.py index 3bf56fe2..1071096c 100644 --- a/ee/cli/plugins/sitedb.py +++ b/ee/cli/plugins/sitedb.py @@ -82,10 +82,10 @@ def updateSiteInfo(self, site, stype='', cache='', webroot='', if webroot and q.site_path != webroot: q.site_path = webroot - if hhvm and q.is_hhvm != hhvm: + if (hhvm is not None) and (q.is_hhvm is not hhvm): q.is_hhvm = hhvm - if webroot and q.is_pagespeed != pagespeed: + if (pagespeed is not None) and (q.is_pagespeed is not pagespeed): q.is_pagespeed = pagespeed try: