diff options
Diffstat (limited to 'ipaplatform')
-rw-r--r-- | ipaplatform/__init__.py | 22 | ||||
-rw-r--r-- | ipaplatform/__init__.py.in | 12 | ||||
-rw-r--r-- | ipaplatform/base/tasks.py | 10 |
3 files changed, 22 insertions, 22 deletions
diff --git a/ipaplatform/__init__.py b/ipaplatform/__init__.py deleted file mode 100644 index cf342aa3f..000000000 --- a/ipaplatform/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Authors: -# Tomas Babej <tbabej@redhat.com> -# -# Copyright (C) 2014 Red Hat -# see file 'COPYING' for use and warranty information -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -''' -Module containing platform-specific functionality for every platform. -''' diff --git a/ipaplatform/__init__.py.in b/ipaplatform/__init__.py.in new file mode 100644 index 000000000..61f6f3c4a --- /dev/null +++ b/ipaplatform/__init__.py.in @@ -0,0 +1,12 @@ +# +# Copyright (C) 2015 FreeIPA Contributors see COPYING for license +# + +''' +Module containing platform-specific functionality for every platform. +''' + +NAME = "__PLATFORM__" + +# FIXME: too much cyclic dependencies +# from __PLATFORM__ import paths, tasks, services diff --git a/ipaplatform/base/tasks.py b/ipaplatform/base/tasks.py index ff71c2bd1..10c5e835d 100644 --- a/ipaplatform/base/tasks.py +++ b/ipaplatform/base/tasks.py @@ -24,6 +24,9 @@ This module contains default platform-specific implementations of system tasks. import pwd import grp + +from pkg_resources import parse_version + from ipaplatform.paths import paths from ipapython.ipa_log_manager import log_mgr from ipapython import ipautil @@ -208,5 +211,12 @@ class BaseTaskNamespace(object): else: log.debug('user %s exists', name) + def parse_ipa_version(self, version): + """ + :param version: textual version + :return: object implementing proper __cmp__ method for version compare + """ + return parse_version(version) + task_namespace = BaseTaskNamespace() |