def _ensure_systemd(version):
 try:
  version = int(version)
 except ValueError:
  raise CommandExecutionError("Invalid version '{0}'".format(version))
 try:
  installed = _sd_version()
  log.debug('nspawn: detected systemd {0}'.format(installed))
 except (IndexError, ValueError):
  raise CommandExecutionError('nspawn: Unable to get systemd version')
 if (installed < version):
  raise CommandExecutionError('This function requires systemd >= {0} (Detected version: {1}).'.format(version, installed))

def _ensure_systemd ( version ) : try : version = int ( version ) except ValueError : raise CommandExecutionError ( "Invalid version '{0}'" . format ( version ) ) try : installed = _sd_version ( ) log . debug ( 'nspawn: detected systemd {0}' . format ( installed ) ) except ( IndexError , ValueError ) : raise CommandExecutionError ( 'nspawn: Unable to get systemd version' ) if ( installed < version ) : raise CommandExecutionError ( 'This function requires systemd >= {0} (Detected version: {1}).' . format ( version , installed ) )
raises an exception if the systemd version is not greater than the passed version .