﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
11098	syncdb raising an ImportError when using pyuno	David De Sousa	nobody	"When working with django and pyuno (python's connector to openoffice), import uno modifies __import__, and the syncdb function raises ImportError in line 50, can't this verification be done in a more elegant way than checking the string returned? or only checking the word ""management""?

libs required to reproduce:
pyuno

steps to reproduce:
with pyuno installed, and running python's shell with a project environment loaded:
{{{
from django.core.management import call_command
call_command(""syncdb"", interactive=False)
}}}
works perfectly, but:
{{{
from django.core.management import call_command
call_command(""syncdb"", interactive=False)
import uno
call_command(""syncdb"", interactive=False)
}}}
brings:
{{{
/usr/lib64/python2.5/site-packages/django/core/management/__init__.pyc in call_command(name, *args, **options)
    156     except KeyError:
    157         raise CommandError, ""Unknown command: %r"" % name
--> 158     return klass.execute(*args, **options)
    159 
    160 class LaxOptionParser(OptionParser):

/usr/lib64/python2.5/site-packages/django/core/management/base.pyc in execute(self, *args, **options)
     94             if self.requires_model_validation:
     95                 self.validate()
---> 96             output = self.handle(*args, **options)
     97             if output:
     98                 if self.output_transaction:

/usr/lib64/python2.5/site-packages/django/core/management/base.pyc in handle(self, *args, **options)
    176         if args:
    177             raise CommandError(""Command doesn't accept any arguments"")
--> 178         return self.handle_noargs(**options)
    179 
    180     def handle_noargs(self, **options):

/usr/lib64/python2.5/site-packages/django/core/management/commands/syncdb.py in handle_noargs(self, **options)
     34         for app_name in settings.INSTALLED_APPS:
     35             try:
---> 36                 __import__(app_name + '.management', {}, {}, [''])
     37             except ImportError, exc:
     38                 # This is slightly hackish. We want to ignore ImportErrors

/usr/lib64/openoffice/basis3.0/program/uno.pyc in _uno_import(name, *optargs)
    299                    except RuntimeException,e3:
    300                       # no known uno type !
--> 301                       raise ImportError( ""type ""+ name + ""."" +x + "" is unknown"" )
    302     return mod
    303 

ImportError: type django.contrib.sessions.management. is unknown
}}}"	Uncategorized	closed	Core (Other)	1.0	Normal	invalid	syncdb importerror import		Unreviewed	0	0	0	0	0	0
