Skip to content

Commit

Permalink
Cleaning code the 2nd
Browse files Browse the repository at this point in the history
  • Loading branch information
Spitfireap committed Aug 29, 2023
1 parent 35fa19e commit ef1bace
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modoboa_installer/scripts/dovecot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from .. import database
from .. import package
from .. import python
from .. import system
from .. import utils

Expand All @@ -33,6 +34,11 @@ class Dovecot(base.Installer):
def __init__(self, *args, **kwargs):
super.__init__(*args, **kwargs)
# Check if modoboa version > 2.2
modoboa_version = python.get_package_version(
"modoboa",
self.venv_path,
sudo_user=self.user
)
self.modoboa_2_2_or_greater = False
condition = (
(modoboa_version[0] == 2 and modoboa_version[1] >= 2) or
Expand Down
5 changes: 5 additions & 0 deletions modoboa_installer/scripts/modoboa.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def __init__(self, *args, **kwargs):
"""Get configuration."""
super(Modoboa, self).__init__(*args, **kwargs)
# Check if modoboa version > 2.2
modoboa_version = python.get_package_version(
"modoboa",
self.venv_path,
sudo_user=self.user
)
self.modoboa_2_2_or_greater = False
condition = (
(modoboa_version[0] == 2 and modoboa_version[1] >= 2) or
Expand Down

0 comments on commit ef1bace

Please sign in to comment.