[Libreoffice-bugs] [Bug 52271] New: pyuno exception handling breaks some applications
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jul 20 00:26:24 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=52271
Bug #: 52271
Summary: pyuno exception handling breaks some applications
Classification: Unclassified
Product: LibreOffice
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: Libreoffice
AssignedTo: libreoffice-bugs at lists.freedesktop.org
ReportedBy: dmbst32 at gmail.com
See https://code.djangoproject.com/ticket/11098
The django developer says "This looks like uno is installing some sort of an
import hook that's written incorrectly to the point that it causes Django to
fail. It's impossible for Django to handle all this sort of monkeypatching, so
this is a bug that'll need to be fixed with uno."
Is this really a bug in pyuno? I'm afraid I don't understand exception handling
well enough to determine this.
It's annoying at least in django developement (and presumably elsewhere)
because pyuno eats up the exceptions sometimes making it hard to debug. Some
applications such as South break due to this. Here is a sample of how it can
break
try:
__import__(app_name + '.management', {}, {}, [''])
except ImportError, exc:
msg = exc.args[0]
if not msg.startswith('No module named') or 'management' not in msg:
raise
Perhaps the msg.startswith is a bit of a hack...but it demonstrates how
annoying this is. I would except the django related exception here, but instead
we pyuno stuff that just shouldn't be here.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Libreoffice-bugs
mailing list