From: Frank Brehm Date: Tue, 7 Nov 2017 16:27:44 +0000 (+0100) Subject: Bugfixing X-Git-Tag: 0.1.2~118 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=eb5df9558fda92373c9f54775ef3f70e6aed7a2a;p=pixelpark%2Fadmin-tools.git Bugfixing --- diff --git a/pp_lib/ldap_app.py b/pp_lib/ldap_app.py index 90961ef..8048fdd 100644 --- a/pp_lib/ldap_app.py +++ b/pp_lib/ldap_app.py @@ -31,7 +31,7 @@ from .common import pp, to_bool from .cfg_app import PpCfgAppError, PpConfigApplication -__version__ = '0.4.6' +__version__ = '0.4.7' LOG = logging.getLogger(__name__) @@ -101,7 +101,7 @@ class PpLdapApplication(PpConfigApplication): raise PpLdapAppError(msg) stems.append(s) else: - stems = self.appname + stems = [self.appname] if 'ldap' not in stems: stems.insert(0, 'ldap') diff --git a/pp_lib/obj.py b/pp_lib/obj.py index e5b13fd..dcee060 100644 --- a/pp_lib/obj.py +++ b/pp_lib/obj.py @@ -21,8 +21,7 @@ from .common import pp, to_bytes from .errors import PpError - -__version__ = '0.2.3' +__version__ = '0.2.4' LOG = logging.getLogger(__name__) @@ -110,7 +109,9 @@ class PpBaseObject(object): @property def appname(self): """The name of the current running application.""" - return self._appname + if hasattr(self, '_appname'): + return self._appname + return os.path.basename(sys.argv[0]) @appname.setter def appname(self, value): @@ -123,7 +124,7 @@ class PpBaseObject(object): @property def version(self): """The version string of the current object or application.""" - return self._version + return getattr(self, '_version', __version__) # ----------------------------------------------------------- @property