URL: https://github.com/freeipa/freeipa/pull/184
Author: simo5
 Title: #184: Minor install script fixes
Action: opened

PR body:
"""
- Use the correct unicode string for an error message, otherwise an
exception will generate another exception about incorrect type,
masking the original error.

- Make sure to pass down the debug flag to ipa-client-install when
the server install is run in debug mode

"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/184/head:pr184
git checkout pr184
From 4867f2c571bb103d1c864cff335fb450d6032dc1 Mon Sep 17 00:00:00 2001
From: Simo Sorce <s...@redhat.com>
Date: Wed, 5 Oct 2016 15:16:30 -0400
Subject: [PATCH] Minor install script fixes

- Use the correct unicode string for an error message, otherwise an
exception will generate another exception about incorrect type,
masking the original error.

- Make sure to pass down the debug flag to ipa-client-install when
the server install is run in debug mode

Signed-off-by: Simo Sorce <s...@redhat.com>
---
 ipalib/rpc.py                       | 3 ++-
 ipaserver/install/server/install.py | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ipalib/rpc.py b/ipalib/rpc.py
index 9594ab5..7756eaf 100644
--- a/ipalib/rpc.py
+++ b/ipalib/rpc.py
@@ -603,7 +603,8 @@ def _auth_complete(self, response):
                     except (TypeError, UnicodeError):
                         pass
             if not token:
-                raise KerberosError(message="No valid Negotiate header in server response")
+                raise KerberosError(
+                    message=u"No valid Negotiate header in server response")
             token = self._sec_context.step(token=token)
             if self._sec_context.complete:
                 self._sec_context = None
diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
index 0015a8c..2ddc7cc 100644
--- a/ipaserver/install/server/install.py
+++ b/ipaserver/install/server/install.py
@@ -896,6 +896,8 @@ def install(installer):
             args.append("--no-sshd")
         if options.mkhomedir:
             args.append("--mkhomedir")
+        if options.debug:
+            args.append("--debug")
         run(args, redirect_output=True)
         print()
     except Exception:
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to