Skip to content

Commit 832cb6a

Browse files
author
gau1991
committed
Fixed issues that was occured with Pagespeed HHVM setup during site update
1 parent d9e76b1 commit 832cb6a

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

ee/cli/plugins/site.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def default(self):
470470
" to enable HHVM now for {0}?".format(ee_domain))
471471

472472
# Check prompt
473-
check_prompt = input("Type \"y\" to continue [n]")
473+
check_prompt = input("Type \"y\" to continue [n]:")
474474
if check_prompt != "Y" and check_prompt != "y":
475475
Log.info(self, "Not using HHVM for site.")
476476
data['hhvm'] = False
@@ -495,7 +495,7 @@ def default(self):
495495
" to enable PageSpeed now for {0}?".format(ee_domain))
496496

497497
# Check prompt
498-
check_prompt = input("Type \"y\" to continue [n]")
498+
check_prompt = input("Type \"y\" to continue [n]:")
499499
if check_prompt != "Y" and check_prompt != "y":
500500
Log.info(self, "Not using PageSpeed for site.")
501501
data['pagespeed'] = False
@@ -978,6 +978,7 @@ def doupdatesite(self, pargs):
978978
elif pagespeed is True:
979979
Log.info(self, "Pagespeed is allready enabled for given "
980980
"site")
981+
pargs.pagespeed = False
981982

982983
if pargs.hhvm:
983984
if hhvm is old_hhvm:
@@ -988,6 +989,8 @@ def doupdatesite(self, pargs):
988989
Log.info(self, "HHVM is allready enabled for given "
989990
"site")
990991

992+
pargs.hhvm = False
993+
991994
if data and (not pargs.hhvm):
992995
if old_hhvm is True:
993996
data['hhvm'] = True
@@ -1004,18 +1007,18 @@ def doupdatesite(self, pargs):
10041007
data['pagespeed'] = False
10051008
pagespeed = False
10061009

1007-
if pargs.pagespeed or pargs.hhvm:
1008-
if pargs.hhvm:
1010+
if pargs.pagespeed=="on" or pargs.hhvm=="on":
1011+
if pargs.hhvm == "on":
10091012
if (not pargs.experimental):
10101013
Log.info(self, "HHVM is experimental feature and it may not"
10111014
" work with all plugins all your site.\nYou can "
10121015
"disable it by passing --hhvm=off later.\nDo you wish"
10131016
" to enable HHVM now for {0}?".format(ee_domain))
10141017

10151018
# Check prompt
1016-
check_prompt = input("Type \"y\" to continue [n]")
1019+
check_prompt = input("Type \"y\" to continue [n]:")
10171020
if check_prompt != "Y" and check_prompt != "y":
1018-
Log.info(self, "Not using HHVM for site.")
1021+
Log.info(self, "Not using HHVM for site")
10191022
data['hhvm'] = False
10201023
hhvm = False
10211024
else:
@@ -1025,17 +1028,17 @@ def doupdatesite(self, pargs):
10251028
data['hhvm'] = True
10261029
hhvm = True
10271030

1028-
if pargs.pagespeed:
1031+
if pargs.pagespeed=="on":
10291032
if (not pargs.experimental):
10301033
Log.info(self, "PageSpeed is experimental feature and it may not"
1031-
"work with all CSS/JS/Cache of your site.\nYou can "
1034+
" work with all CSS/JS/Cache of your site.\nYou can "
10321035
"disable it by passing --pagespeed=off later.\nDo you wish"
10331036
" to enable PageSpeed now for {0}?".format(ee_domain))
10341037

10351038
# Check prompt
1036-
check_prompt = input("Type \"y\" to continue [n]")
1039+
check_prompt = input("Type \"y\" to continue [n]:")
10371040
if check_prompt != "Y" and check_prompt != "y":
1038-
Log.info("Not using PageSpeed for site.")
1041+
Log.info(self, "Not using Pagespeed for given site")
10391042
data['pagespeed'] = False
10401043
pagespeed = False
10411044
else:
@@ -1045,9 +1048,9 @@ def doupdatesite(self, pargs):
10451048
data['pagespeed'] = True
10461049
pagespeed = False
10471050

1048-
if ((hhvm is old_hhvm) and (pagespeed is old_pagespeed) and
1049-
(stype == oldsitetype and cache == oldcachetype)):
1050-
return 1
1051+
if ((hhvm is old_hhvm) and (pagespeed is old_pagespeed) and
1052+
(stype == oldsitetype and cache == oldcachetype)):
1053+
return 1
10511054

10521055
if not data:
10531056
Log.error(self, "Cannot update {0}, Invalid Options"

0 commit comments

Comments
 (0)