On 27.05.2016 11:35, Florence Blanc-Renaud wrote:

Hi all,

this patch adds information to the output of ipa-client-install when it fails due to invalid format in a configuration file: ipa-client-install failing with SyntaxError: Syntax Error: Unknown line format

Fixes: https://fedorahosted.org/freeipa/ticket/5811

Florence Blanc-Renaud
Identity Management Team, Red Hat

Thank you for your patch, I have just one nitpick. Can you please reuse the original exception?

-            curopts.append(self.parseLine(line))
+            try:
+                curopts.append(self.parseLine(line))
+            except SyntaxError as e:
+ raise SyntaxError('{error} in file {fname}: [{line}]'.format(
+                    error=e, fname=f.name, line=line))

Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to