pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone
Blob Blame History Raw
From 06df4a281c5e4b2be4840fb42129478279792a9d Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspacek@redhat.com>
Date: Thu, 26 Nov 2015 14:56:00 +0100
Subject: [PATCH] DNSSEC: Improve error reporting from ipa-ods-exporter

https://fedorahosted.org/freeipa/ticket/5348

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
---
 daemons/dnssec/ipa-ods-exporter | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/daemons/dnssec/ipa-ods-exporter b/daemons/dnssec/ipa-ods-exporter
index f30a2253a713d857aa4e7566e52a0a45f7bd50c2..12a9294ae05d2ce8d206a2bbf74cc00d81259efa 100755
--- a/daemons/dnssec/ipa-ods-exporter
+++ b/daemons/dnssec/ipa-ods-exporter
@@ -31,6 +31,7 @@ import systemd.daemon
 import systemd.journal
 import sqlite3
 import time
+import traceback
 
 import ipalib
 from ipapython.dn import DN
@@ -576,7 +577,8 @@ try:
             sync_zone(log, ldap, dns_dn, zone_row['name'])
 
 except Exception as ex:
-    msg = "ipa-ods-exporter exception: %s" % ex
+    msg = "ipa-ods-exporter exception: %s" % traceback.format_exc(ex)
+    log.exception(ex)
     raise ex
 
 finally:
-- 
2.4.3