mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
use sys.exit instead of exit
This commit is contained in:
parent
4a3f306259
commit
1825833325
1 changed files with 2 additions and 2 deletions
|
|
@ -10,8 +10,8 @@ cb_installed=$(grep -oP "__version__ = '\K.*(?=')" $SNAP/certbot-shared/__init__
|
|||
# get required certbot version for plugin
|
||||
cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
python3 -c "from distutils.version import LooseVersion; exit(1) if LooseVersion('$cb_installed')\
|
||||
< LooseVersion('$cb_required') else exit(0)" || exit_code=$?
|
||||
python3 -c "from distutils.version import LooseVersion; import sys; sys.exit(1) if\
|
||||
LooseVersion('$cb_installed') < LooseVersion('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
|
|
|
|||
Loading…
Reference in a new issue