Jakub, On Sun, Jun 28, 2009 at 16:40, Jakub Wilk<uba...@users.sf.net> wrote: > Sandro, > > I think I'd be better to keep this bugreport (or perhaps its clone) assigned > to reportbug, at least to avoid more duplicate reports.
I think the solution is fix it in python-gtk2 >>> /usr/lib/pymodules/python2.5/gtk-2.0/gtk/__init__.py:72: GtkWarning: >>> could not open display >>> warnings.warn(str(e), _gtk.Warning) >> >> this is a bug (if it's a bug) in python-gtk2, hence reassignig it to >> that pacakge. > > I'd disagree. > > I find it perfectly reasonable that python-gtk2 issues a warning; in *most > cases* the module has limited usefulness when $DISPLAY is not set to a valid > value. ok, so this is informative for a user, but how can this be useful for a program? > Moreover, the issue can be easily fixed in reportbug: by suppressing the > warning or by checking if $DISPLAY is set before trying to load the module. > (I could provide a patch if you wish.) No, this is to be done in python-gtk2. IMNSHO. >>> This is mainly cosmetic, but reportbug should not rely on there being >>> more >>> than a console mode terminal available. >> >> We have to know what UIs are available: if there is no DISPLAY, gtk should >> not issue a warning but raising an exception. > > A Python module should not raise exceptions at import time without > a good reason. The solution you propose would break pydoc, for instance. If it can't work without DISPLAY, then raise an exception; if it can work without DISPLAY then remote the worning. > BTW, I am currenly working around this bug by using the attached wrapper. It doesn't seem an elegant solution. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org