Browse Source

minor chnages

bugfixes
shitalp 10 years ago
parent
commit
32d55234eb
  1. 31
      ee/cli/plugins/stack.py

31
ee/cli/plugins/stack.py

@ -70,6 +70,9 @@ class EEStackController(CementBaseController):
dict(help='Install Adminer stack', action='store_true')),
(['--utils'],
dict(help='Install Utils stack', action='store_true')),
(['--prompt'],
dict(help="ask permission for delete",
action='store_true')),
]
usage = "ee stack (command) [options]"
@ -1667,33 +1670,33 @@ class EEStackController(CementBaseController):
.format(EEVariables.ee_webroot)]
if len(apt_packages):
if not self.app.pargs.no_prompt:
if self.app.pargs.prompt:
ee_apt_pkg_prompt = input('Are you sure you to want to'
' purge from server'
'. Package configuration will remain'
' on server after this operation.'
' packages Any answer other than '
' Any answer other than '
' "yes" will be stop this'
' operation ')
else:
ee_apt_pkg_prompt = 'Y'
if ee_apt_pkg_prompt == 'Y' or ee_apt_pkg_prompt == 'y':
ee_apt_pkg_prompt = 'YES'
if ee_apt_pkg_prompt == 'YES' or ee_apt_pkg_prompt == 'yes':
Log.debug(self, "Removing apt_packages")
Log.info(self, "Removing packages, please wait ...")
EEAptGet.remove(self, apt_packages)
EEAptGet.auto_remove(self)
if len(packages):
if not self.app.pargs.no_prompt:
if self.app.pargs.prompt:
ee_pkg_prompt = input('Are you sure you to want to purge'
' from server.'
' Package configuration will remain '
'on server after this operation.'
' packages Any answer other than '
' Any answer other than '
'"yes" will be stop this '
'operation ')
else:
ee_pkg_prompt = 'Y'
if ee_pkg_prompt == 'Y' or ee_pkg_prompt == 'y':
ee_pkg_prompt = 'YES'
if ee_pkg_prompt == 'YES' or ee_pkg_prompt == 'yes':
EEFileUtils.remove(self, packages)
EEAptGet.auto_remove(self)
Log.info(self, "Successfully removed packages")
@ -1790,7 +1793,7 @@ class EEStackController(CementBaseController):
]
if len(apt_packages):
if not self.app.pargs.no_prompt:
if not self.app.pargs.prompt:
ee_apt_pkg_prompt = input('Are you sure you to want to purge '
'from server '
'alongwith their configuration.'
@ -1798,13 +1801,13 @@ class EEStackController(CementBaseController):
'"yes" will be stop this '
'operation ')
else:
ee_apt_pkg_prompt = 'Y'
if ee_apt_pkg_prompt == 'Y' or ee_apt_pkg_prompt == 'y':
ee_apt_pkg_prompt = 'YES'
if ee_apt_pkg_prompt == 'YES' or ee_apt_pkg_prompt == 'yes':
Log.info(self, "Purging packages, please wait ...")
EEAptGet.remove(self, apt_packages, purge=True)
EEAptGet.auto_remove(self)
if len(packages):
if not self.app.pargs.no_prompt:
if not self.app.pargs.prompt:
ee_pkg_prompt = input('Are you sure you to want to purge '
' from server alongwith '
' their configuration.'
@ -1812,8 +1815,8 @@ class EEStackController(CementBaseController):
'"yes" will be stop this '
'operation ')
else:
ee_pkg_prompt = 'Y'
if ee_pkg_prompt == 'Y' or ee_pkg_prompt == 'y':
ee_pkg_prompt = 'YES'
if ee_pkg_prompt == 'YES' or ee_pkg_prompt == 'yes':
EEFileUtils.remove(self, packages)
EEAptGet.auto_remove(self)
Log.info(self, "Successfully purged packages")

Loading…
Cancel
Save