Thursday, April 16, 2020

[389-commits] [389-ds-base] branch 389-ds-base-1.4.1 updated: Issue 50337 - Replace exec() with setattr()

This is an automated email from the git hooks/post-receive script.

mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.

The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 42db968 Issue 50337 - Replace exec() with setattr()
42db968 is described below

commit 42db968f32b6a13fcdfc9fd7ddd3c2db9fff35f4
Author: Viktor Ashirov <vashirov@redhat.com>
AuthorDate: Fri Apr 3 15:16:55 2020 +0200

Issue 50337 - Replace exec() with setattr()

Bug Description:
Instance IDs now include superfluous quotes that break
calling CLI tools from lib389.

Fix Description:
Remove the quotes.

Fixes: https://pagure.io/389-ds-base/issue/50337

Reviewed by: spichugi (Thanks!)
---
src/lib389/lib389/_constants.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib389/lib389/_constants.py b/src/lib389/lib389/_constants.py
index 27cd88d..cbffafe 100644
--- a/src/lib389/lib389/_constants.py
+++ b/src/lib389/lib389/_constants.py
@@ -292,7 +292,7 @@ for i in range(port_start, port_start + number_of_instances):
setattr(mod, "HOST_STANDALONE{0}".format(N), "LOCALHOST")
setattr(mod, "PORT_STANDALONE{0}".format(N), i)
setattr(mod, "SECUREPORT_STANDALONE{0}".format(N), i + 24700)
- setattr(mod, "SERVERID_STANDALONE{0}".format(N), "\"standalone{0}\"".format(N))
+ setattr(mod, "SERVERID_STANDALONE{0}".format(N), "standalone{0}".format(N))
setattr(mod, "REPLICAID_STANDALONE_{0}".format(N), 65535)

# For compatibility
@@ -309,7 +309,7 @@ for i in range(port_start, port_start + number_of_instances):
setattr(mod, "HOST_MASTER_{0}".format(N), "LOCALHOST")
setattr(mod, "PORT_MASTER_{0}".format(N), i)
setattr(mod, "SECUREPORT_MASTER_{0}".format(N), i + 24700)
- setattr(mod, "SERVERID_MASTER_{0}".format(N), "\"master{0}\"".format(N))
+ setattr(mod, "SERVERID_MASTER_{0}".format(N), "master{0}".format(N))
setattr(mod, "REPLICAID_MASTER_{0}".format(N), N)

# Replication topology - hubs
@@ -320,7 +320,7 @@ for i in range(port_start, port_start + number_of_instances):
setattr(mod, "HOST_HUB_{0}".format(N), "LOCALHOST")
setattr(mod, "PORT_HUB_{0}".format(N), i)
setattr(mod, "SECUREPORT_HUB_{0}".format(N), i + 24700)
- setattr(mod, "SERVERID_HUB_{0}".format(N), "\"hub{0}\"".format(N))
+ setattr(mod, "SERVERID_HUB_{0}".format(N), "hub{0}".format(N))
setattr(mod, "REPLICAID_HUB_{0}".format(N), 65535)

# Replication topology - consumers
@@ -331,7 +331,7 @@ for i in range(port_start, port_start + number_of_instances):
setattr(mod, "HOST_CONSUMER_{0}".format(N), "LOCALHOST")
setattr(mod, "PORT_CONSUMER_{0}".format(N), i)
setattr(mod, "SECUREPORT_CONSUMER_{0}".format(N), i + 24700)
- setattr(mod, "SERVERID_CONSUMER_{0}".format(N), "\"consumer{0}\"".format(N))
+ setattr(mod, "SERVERID_CONSUMER_{0}".format(N), "consumer{0}".format(N))

# Cleanup, we don't need to export that
del N, port_start, number_of_instances

--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-commits@lists.fedoraproject.org

No comments:

Post a Comment