This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch master
in repository lib389.
commit bde1530650e2d406ca7748773d88d48aec626654
Author: Simon Pichugin <spichugi(a)redhat.com>
Date: Tue Sep 12 07:58:23 2017 +0200
Issue #77 - Fix changelogdb param issue
Bug description: self.dbdir used before an assignment
in Changelog(conn) __init__ part, while self.dbdir is defined
in __initPart2 of DirSrv object.
Fix description: Add self.changelogdb to __initPart2 with default value.
Assign a new value in conn.changelog.create().
https://pagure.io/lib389/issue/77
Reviewed by: mreynolds (Thanks!)
---
lib389/__init__.py | 1 +
lib389/changelog.py | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib389/__init__.py b/lib389/__init__.py
index 0b0a1fa..abd60d4 100644
--- a/lib389/__init__.py
+++ b/lib389/__init__.py
@@ -275,6 +275,7 @@ class DirSrv(SimpleLDAPObject, object):
self.ldifdir = self.ds_paths.ldif_dir
self.instdir = self.ds_paths.inst_dir
self.dbdir = self.ds_paths.db_dir
+ self.changelogdir = os.path.join(os.path.dirname(self.dbdir),
DEFAULT_CHANGELOG_DB)
def rebind(self):
"""Reconnect to the DS
diff --git a/lib389/changelog.py b/lib389/changelog.py
index 65f7591..22fe01a 100644
--- a/lib389/changelog.py
+++ b/lib389/changelog.py
@@ -26,7 +26,6 @@ class Changelog(object):
def __init__(self, conn):
self.conn = conn
self.log = conn.log
- self.changelogdir = os.path.join(os.path.dirname(self.conn.dbdir),
DEFAULT_CHANGELOG_DB)
def __getattr__(self, name):
if name in Changelog.proxied_methods:
@@ -74,7 +73,7 @@ class Changelog(object):
CHANGELOG_PROPNAME_TO_ATTRNAME[CHANGELOG_DIR]: dirpath
})
self.log.debug("adding changelog entry: %r" % entry)
- self.changelogdir = dirpath
+ self.conn.changelogdir = dirpath
try:
self.conn.add_s(entry)
except ldap.ALREADY_EXISTS:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.