summaryrefslogtreecommitdiffstats
path: root/ipaserver/install
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2017-01-18 17:08:19 +0100
committerDavid Kupka <dkupka@redhat.com>2017-01-31 10:44:42 +0100
commitf2ec44f2705fe87b71c6290ae8b35bc0a05f68d2 (patch)
tree274e2b6a852088393cf86f6141ab1a8bedbe2fdc /ipaserver/install
parent38fd8b356d66553d21a3e64374fdc39427a05baf (diff)
downloadfreeipa-f2ec44f2705fe87b71c6290ae8b35bc0a05f68d2.tar.gz
freeipa-f2ec44f2705fe87b71c6290ae8b35bc0a05f68d2.tar.xz
freeipa-f2ec44f2705fe87b71c6290ae8b35bc0a05f68d2.zip
Use proper logging for error messages
https://fedorahosted.org/freeipa/ticket/6588r Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaserver/install')
-rw-r--r--ipaserver/install/replication.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py
index c4260dd18..1f1378354 100644
--- a/ipaserver/install/replication.py
+++ b/ipaserver/install/replication.py
@@ -176,7 +176,7 @@ def wait_for_entry(connection, dn, timeout=7200, attr='', quiet=True):
except errors.NotFound:
pass # no entry yet
except Exception as e: # badness
- print("\nError reading entry", dn, e)
+ root_logger.error("Error reading entry %s: %s", dn, e)
break
if not entry:
if not quiet:
@@ -185,11 +185,13 @@ def wait_for_entry(connection, dn, timeout=7200, attr='', quiet=True):
time.sleep(1)
if not entry and int(time.time()) > timeout:
- print("\nwait_for_entry timeout for %s for %s" % (connection, dn))
+ root_logger.error(
+ "wait_for_entry timeout for %s for %s", connection, dn)
elif entry and not quiet:
- print("\nThe waited for entry is:", entry)
+ root_logger.error("The waited for entry is: %s", entry)
elif not entry:
- print("\nError: could not read entry %s from %s" % (dn, connection))
+ root_logger.error(
+ "Error: could not read entry %s from %s", dn, connection)
class ReplicationManager(object):