Re: [Freeipa-devel] [PATCH 0179] Fix traceback if zonemgr error message contains unicode characters
On 09/01/15 14:07, David Kupka wrote: On 12/12/2014 02:26 PM, Martin Basti wrote: https://fedorahosted.org/freeipa/ticket/4805 Patch attached. Does not work properly. $ locale LANG=cs_CZ.iso88592 LC_CTYPE=cs_CZ.iso88592 LC_NUMERIC=cs_CZ.iso88592 LC_TIME=cs_CZ.iso88592 LC_COLLATE=cs_CZ.iso88592 LC_MONETARY=cs_CZ.iso88592 LC_MESSAGES=cs_CZ.iso88592 LC_PAPER=cs_CZ.iso88592 LC_NAME=cs_CZ.iso88592 LC_ADDRESS=cs_CZ.iso88592 LC_TELEPHONE=cs_CZ.iso88592 LC_MEASUREMENT=cs_CZ.iso88592 LC_IDENTIFICATION=cs_CZ.iso88592 LC_ALL=cs_CZ.iso88592 $ sudo ipa-server-install --setup-dns --forwarder=10.65.201.89 -r TESTRELM.TEST -p -P -a --zonemg=Ťažk...@redhat.com -U /tmp/ipaserverinstall_invalidzonemgr.out 21 $ cat /tmp/ipaserverinstall_invalidzonemgr.out Usage: ipa-server-install [options] ipa-server-install: error: invalid zonemgr: domain name 'ŤaĹžko.redhat.com' should be normalized to: ĹĽaĹžko.redhat.com The provided value isn't right and must be normalized but the one displayed in error message doesn't match. ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel Sorry, but it works for me. I tested it with LC_ALL=sk_SK.ISO-8859-2 -- Martin Basti ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0179] Fix traceback if zonemgr error message contains unicode characters
On 01/12/2015 01:25 PM, Martin Basti wrote: On 09/01/15 14:07, David Kupka wrote: On 12/12/2014 02:26 PM, Martin Basti wrote: https://fedorahosted.org/freeipa/ticket/4805 Patch attached. Does not work properly. $ locale LANG=cs_CZ.iso88592 LC_CTYPE=cs_CZ.iso88592 LC_NUMERIC=cs_CZ.iso88592 LC_TIME=cs_CZ.iso88592 LC_COLLATE=cs_CZ.iso88592 LC_MONETARY=cs_CZ.iso88592 LC_MESSAGES=cs_CZ.iso88592 LC_PAPER=cs_CZ.iso88592 LC_NAME=cs_CZ.iso88592 LC_ADDRESS=cs_CZ.iso88592 LC_TELEPHONE=cs_CZ.iso88592 LC_MEASUREMENT=cs_CZ.iso88592 LC_IDENTIFICATION=cs_CZ.iso88592 LC_ALL=cs_CZ.iso88592 $ sudo ipa-server-install --setup-dns --forwarder=10.65.201.89 -r TESTRELM.TEST -p -P -a --zonemg=Ťažk...@redhat.com -U /tmp/ipaserverinstall_invalidzonemgr.out 21 $ cat /tmp/ipaserverinstall_invalidzonemgr.out Usage: ipa-server-install [options] ipa-server-install: error: invalid zonemgr: domain name 'ŤaĹžko.redhat.com' should be normalized to: ĹĽaĹžko.redhat.com The provided value isn't right and must be normalized but the one displayed in error message doesn't match. ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel Sorry, but it works for me. I tested it with LC_ALL=sk_SK.ISO-8859-2 You're right I probably miss-configured the encoding in Konsole. Now I've tried it again and it works, ACK. -- David Kupka P.S.: Sorry for unjustified NACK. ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0179] Fix traceback if zonemgr error message contains unicode characters
On 01/12/2015 01:56 PM, David Kupka wrote: On 01/12/2015 01:25 PM, Martin Basti wrote: On 09/01/15 14:07, David Kupka wrote: On 12/12/2014 02:26 PM, Martin Basti wrote: https://fedorahosted.org/freeipa/ticket/4805 Patch attached. Does not work properly. $ locale LANG=cs_CZ.iso88592 LC_CTYPE=cs_CZ.iso88592 LC_NUMERIC=cs_CZ.iso88592 LC_TIME=cs_CZ.iso88592 LC_COLLATE=cs_CZ.iso88592 LC_MONETARY=cs_CZ.iso88592 LC_MESSAGES=cs_CZ.iso88592 LC_PAPER=cs_CZ.iso88592 LC_NAME=cs_CZ.iso88592 LC_ADDRESS=cs_CZ.iso88592 LC_TELEPHONE=cs_CZ.iso88592 LC_MEASUREMENT=cs_CZ.iso88592 LC_IDENTIFICATION=cs_CZ.iso88592 LC_ALL=cs_CZ.iso88592 $ sudo ipa-server-install --setup-dns --forwarder=10.65.201.89 -r TESTRELM.TEST -p -P -a --zonemg=Ťažk...@redhat.com -U /tmp/ipaserverinstall_invalidzonemgr.out 21 $ cat /tmp/ipaserverinstall_invalidzonemgr.out Usage: ipa-server-install [options] ipa-server-install: error: invalid zonemgr: domain name 'ŤaĹžko.redhat.com' should be normalized to: ĹĽaĹžko.redhat.com The provided value isn't right and must be normalized but the one displayed in error message doesn't match. ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel Sorry, but it works for me. I tested it with LC_ALL=sk_SK.ISO-8859-2 You're right I probably miss-configured the encoding in Konsole. Now I've tried it again and it works, ACK. Pushed to: master: 727f8099af9ace4a7a8e4489b34aa2db440336b2 ipa-4-1: fb1d848b490606846c14d764fabac5186a60fe4e ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0179] Fix traceback if zonemgr error message contains unicode characters
Dne 9.1.2015 v 14:07 David Kupka napsal(a): On 12/12/2014 02:26 PM, Martin Basti wrote: https://fedorahosted.org/freeipa/ticket/4805 Patch attached. Does not work properly. $ locale LANG=cs_CZ.iso88592 LC_CTYPE=cs_CZ.iso88592 LC_NUMERIC=cs_CZ.iso88592 LC_TIME=cs_CZ.iso88592 LC_COLLATE=cs_CZ.iso88592 LC_MONETARY=cs_CZ.iso88592 LC_MESSAGES=cs_CZ.iso88592 LC_PAPER=cs_CZ.iso88592 LC_NAME=cs_CZ.iso88592 LC_ADDRESS=cs_CZ.iso88592 LC_TELEPHONE=cs_CZ.iso88592 LC_MEASUREMENT=cs_CZ.iso88592 LC_IDENTIFICATION=cs_CZ.iso88592 LC_ALL=cs_CZ.iso88592 $ sudo ipa-server-install --setup-dns --forwarder=10.65.201.89 -r TESTRELM.TEST -p -P -a --zonemg=Ťažk...@redhat.com -U /tmp/ipaserverinstall_invalidzonemgr.out 21 $ cat /tmp/ipaserverinstall_invalidzonemgr.out Usage: ipa-server-install [options] ipa-server-install: error: invalid zonemgr: domain name 'ŤaĹžko.redhat.com' should be normalized to: ĹĽaĹžko.redhat.com The provided value isn't right and must be normalized but the one displayed in error message doesn't match. That's because your terminal encoded it in utf-8 instead of iso-8859-2. It may be because you set the LC_* environment variables from within the terminal? -- Jan Cholasta ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH 0179] Fix traceback if zonemgr error message contains unicode characters
On 12/12/2014 02:26 PM, Martin Basti wrote: https://fedorahosted.org/freeipa/ticket/4805 Patch attached. Does not work properly. $ locale LANG=cs_CZ.iso88592 LC_CTYPE=cs_CZ.iso88592 LC_NUMERIC=cs_CZ.iso88592 LC_TIME=cs_CZ.iso88592 LC_COLLATE=cs_CZ.iso88592 LC_MONETARY=cs_CZ.iso88592 LC_MESSAGES=cs_CZ.iso88592 LC_PAPER=cs_CZ.iso88592 LC_NAME=cs_CZ.iso88592 LC_ADDRESS=cs_CZ.iso88592 LC_TELEPHONE=cs_CZ.iso88592 LC_MEASUREMENT=cs_CZ.iso88592 LC_IDENTIFICATION=cs_CZ.iso88592 LC_ALL=cs_CZ.iso88592 $ sudo ipa-server-install --setup-dns --forwarder=10.65.201.89 -r TESTRELM.TEST -p -P -a --zonemg=Ťažk...@redhat.com -U /tmp/ipaserverinstall_invalidzonemgr.out 21 $ cat /tmp/ipaserverinstall_invalidzonemgr.out Usage: ipa-server-install [options] ipa-server-install: error: invalid zonemgr: domain name 'ŤaĹžko.redhat.com' should be normalized to: ĹĽaĹžko.redhat.com The provided value isn't right and must be normalized but the one displayed in error message doesn't match. ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel -- David Kupka ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
[Freeipa-devel] [PATCH 0179] Fix traceback if zonemgr error message contains unicode characters
https://fedorahosted.org/freeipa/ticket/4805 Patch attached. -- Martin Basti From a890b3171e1ee6873899266382412fbf36d4ba97 Mon Sep 17 00:00:00 2001 From: Martin Basti mba...@redhat.com Date: Fri, 12 Dec 2014 14:23:32 +0100 Subject: [PATCH] Fix traceback if zonemgr error contains unicode Ticket: https://fedorahosted.org/freeipa/ticket/4805 --- ipaserver/install/bindinstance.py | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index 547cf19ee36140b5f29fcf7d217933fa68e1952b..4e630e8ddfed524d021d19016f48615fc8c0ab9d 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -411,7 +411,14 @@ def zonemgr_callback(option, opt_str, value, parser): value = value.decode(encoding) validate_zonemgr_str(value) except ValueError, e: -parser.error(invalid zonemgr: + unicode(e)) +# FIXME we can do this in better way +# https://fedorahosted.org/freeipa/ticket/4804 +# decode to proper stderr encoding +stderr_encoding = getattr(sys.stderr, 'encoding', None) +if stderr_encoding is None: +stderr_encoding = 'utf-8' +error = unicode(e).encode(stderr_encoding) +parser.error(invalid zonemgr: + error) parser.values.zonemgr = value -- 1.8.3.1 ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel