from .ldap import BaseLdapApplication
from ..xlate import XLATOR
-__version__ = '0.7.0'
+__version__ = '0.7.1'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
"""Reading virtual aliases from given file."""
LOG.info(_("Reading in from virtual alias file {!r} ...").format(str(va_file)))
+ handler = BaseHandler(appname=self.appname, verbose=self.verbose)
+ pdata = handler.call([str(self.postmap_command), '-s', str(va_file)], quiet=True)
+
+ if pdata.returncode > 0:
+ msg = _('Error {rc} on getting virtual aliases from {va!r}').format(
+ rc=pdata.returncode, va=str(va_file))
+ if pdata.stderr:
+ msg += ': ' + pdata.stderr
+ else:
+ msg += '.'
+ LOG.err(msg)
+ self.exit(6)
+
+ if self.verbose > 2:
+ LOG.debug(_('Result:') + '\n' + str(pdata))
+
# -------------------------------------------------------------------------
def _run(self):