[Freeipa-devel] [PATCH] 584 migration: fix import of wsgiref.util

Tomas Babej tbabej at redhat.com
Wed May 7 13:38:40 UTC 2014


On 04/01/2014 09:25 AM, Jan Pazdziora wrote:
> On Tue, Apr 01, 2014 at 08:47:25AM +0200, Petr Vobornik wrote:
>> https://fedorahosted.org/freeipa/ticket/4293
>> -- 
>> Petr Vobornik
>> From dc4eaf9d622b4eac9fb3d942b23083bfb903be9a Mon Sep 17 00:00:00 2001
>> From: Petr Vobornik <pvoborni at redhat.com>
>> Date: Tue, 1 Apr 2014 08:45:08 +0200
>> Subject: [PATCH] migration: fix import of wsgiref.util
>>
>> https://fedorahosted.org/freeipa/ticket/4293
>> ---
>>  install/migration/migration.py | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/install/migration/migration.py b/install/migration/migration.py
>> index 27e23a59f660c791c12948b4c40406d03b0f0966..acc1ee48dd8744f6abd2d7a59f0d5feb54fc93f9 100644
>> --- a/install/migration/migration.py
>> +++ b/install/migration/migration.py
>> @@ -23,7 +23,7 @@ Password migration script
>>  import cgi
>>  import errno
>>  import glob
>> -import wsgiref
>> +from wsgiref.util import request_uri
>>  
>>  from ipapython.ipa_log_manager import root_logger
>>  from ipapython.ipautil import get_ipa_basedn
>> @@ -37,7 +37,7 @@ def wsgi_redirect(start_response, loc):
>>      return []
>>  
>>  def get_ui_url(environ):
>> -    full_url = wsgiref.util.request_uri(environ)
>> +    full_url = request_uri(environ)
> Sadly, this antipattern seems needed even if the proper solution would
> be to fix wsgi to properly export util. Is there bug filed for that.
>
> Ack based on reading the code and wsgiref documentation where the same
> import style is used.
>

ACK, I did the functional tests as well, works fine.

-- 
Tomas Babej
Associate Software Engineer | Red Hat | Identity Management
RHCE | Brno Site | IRC: tbabej | freeipa.org 




More information about the Freeipa-devel mailing list