Browse Source

Fix int -> str issue

develop
Prabuddha Chakraborty 9 years ago
parent
commit
8bf15b77de
  1. 12
      ee/cli/plugins/site.py
  2. 4
      ee/cli/plugins/site_functions.py

12
ee/cli/plugins/site.py

@ -765,7 +765,7 @@ class EESiteUpdateController(CementBaseController):
(['--letsencrypt'], (['--letsencrypt'],
dict(help="configure letsencrypt ssl for the site", dict(help="configure letsencrypt ssl for the site",
action='store' or 'store_const', action='store' or 'store_const',
choices=('on', 'off', 'renew'), const='on', nargs='?')), choices=('on', 'off', 'renew', 'status'), const='on', nargs='?')),
(['--proxy'], (['--proxy'],
dict(help="update to proxy site", nargs='+')), dict(help="update to proxy site", nargs='+')),
(['--experimental'], (['--experimental'],
@ -1025,6 +1025,8 @@ class EESiteUpdateController(CementBaseController):
"site") "site")
pargs.pagespeed = False pargs.pagespeed = False
#--letsencrypt=status code here
#if pargs.letsencrypt == "renew":
#--letsencrypt=renew code goes here #--letsencrypt=renew code goes here
if pargs.letsencrypt == "renew": if pargs.letsencrypt == "renew":
@ -1036,8 +1038,8 @@ class EESiteUpdateController(CementBaseController):
Log.info(self, "SUCCESS: Certificate was successfully renewed For" Log.info(self, "SUCCESS: Certificate was successfully renewed For"
" https://{0}".format(ee_domain)) " https://{0}".format(ee_domain))
if (SSL.getExpirationDays(ee_domain)>0): if (SSL.getExpirationDays(ee_domain)>0):
Log.info(self, "Your cert will expire within " + SSL.getExpirationDays(ee_domain) + " days.") Log.info(self, "Your cert will expire within " + str(SSL.getExpirationDays(self,ee_domain)) + " days.")
Log.info(self, "Expiration DATE: " + SSL.getExpirationDate(ee_domain)) Log.info(self, "Expiration DATE: " + str(SSL.getExpirationDate(self,ee_domain)))
else: else:
Log.warn(self, "Your cert already EXPIRED ! .PLEASE renew soon . ") Log.warn(self, "Your cert already EXPIRED ! .PLEASE renew soon . ")
@ -1236,8 +1238,8 @@ class EESiteUpdateController(CementBaseController):
Log.info(self, "Congratulations! Successfully Configured SSl for Site " Log.info(self, "Congratulations! Successfully Configured SSl for Site "
" https://{0}".format(ee_domain)) " https://{0}".format(ee_domain))
if (SSL.getExpirationDays(ee_domain)>0): if (SSL.getExpirationDays(self,ee_domain)>0):
Log.info(self, "Your cert will expire within " + SSL.getExpirationDays() + " days.") Log.info(self, "Your cert will expire within " + str(SSL.getExpirationDays(self,ee_domain)) + " days.")
else: else:
Log.warn(self, "Your cert already EXPIRED ! .PLEASE renew soon . ") Log.warn(self, "Your cert already EXPIRED ! .PLEASE renew soon . ")

4
ee/cli/plugins/site_functions.py

@ -1267,8 +1267,8 @@ def renewLetsEncrypt(self, ee_domain_name):
+ "--email {0} --text --agree-tos".format(ee_wp_email)) + "--email {0} --text --agree-tos".format(ee_wp_email))
if not ssl: if not ssl:
Log.error(self,"ERROR : Cannot RENEW SSL cert !",False) Log.error(self,"ERROR : Cannot RENEW SSL cert !",False)
if (SSL.getExpirationDays(ee_domain_name)>0): if (SSL.getExpirationDays(self,ee_domain_name)>0):
Log.error(self, "Your current cert will expire within " + SSL.getExpirationDays(ee_domain_name) + " days.",False) Log.error(self, "Your current cert will expire within " + str(SSL.getExpirationDays(self,ee_domain_name)) + " days.",False)
else: else:
Log.error(self, "Your current cert already EXPIRED !",False) Log.error(self, "Your current cert already EXPIRED !",False)

Loading…
Cancel
Save