URL: https://github.com/freeipa/freeipa/pull/3504
Author: tiran
 Title: #3504: [Backport][ipa-4-8] Fix UnboundLocalError in ipa-replica-manage 
on errors
Action: opened

PR body:
"""
This PR was opened automatically because PR #3501 was pushed to master and 
backport to ipa-4-8 is required.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/3504/head:pr3504
git checkout pr3504
From 4d29f840f724c48ee92ec680f199befed181d5aa Mon Sep 17 00:00:00 2001
From: Theodor van Nahl <tvn+...@van-nahl.org>
Date: Mon, 5 Aug 2019 10:47:16 -0400
Subject: [PATCH] Fix UnboundLocalError in ipa-replica-manage on errors

If ipa-replica-manage is unable to retrieve e.g. due to certificate
validity problem. An UnboundLocalError is thrown for `type1`. This fixes
the issue with a clean exit.
---
 install/tools/ipa-replica-manage.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/install/tools/ipa-replica-manage.in b/install/tools/ipa-replica-manage.in
index a276239fbc..f4e949407b 100644
--- a/install/tools/ipa-replica-manage.in
+++ b/install/tools/ipa-replica-manage.in
@@ -279,6 +279,7 @@ def del_link(realm, replica1, replica2, dirman_passwd, force=False):
         return False
     except Exception as e:
         print("Failed to determine agreement type for '%s': %s" % (replica2, e))
+        return False
 
     if type1 == replication.IPA_REPLICA and managed_topology:
         exit_on_managed_topology(what)
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.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.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to