Nmap Development mailing list archives
Re: zenmap as root error
From: "João Medeiros" <ignotus21 () gmail com>
Date: Tue, 1 Apr 2008 23:28:46 -0300
On Tue, Apr 1, 2008 at 11:21 PM, Guilherme Polo <ggpolo () gmail com> wrote:
2008/4/1, João Medeiros <ignotus21 () gmail com>:On Tue, Apr 1, 2008 at 10:52 PM, Guilherme Polo <ggpolo () gmail com> wrote:> > But, for PyGtk 2.8 and earlier I would suggest doing this in a > > different manner (and much simpler and less error-prone): > > > > try: > > import gtk > > except ImportError, e: > > print e > > > > For PyGtk 2.10 and newer, ImportError is actually a warning so the > > code changes a bit: > > > > import warnings > > warnings.filterwarnings('error', module='gtk') > > try: > > import gtk > > except Warning, w: > > print w > > warnings.resetwarnings() > > > > > I think that just display the an eventually warning is not enough. We > have to leave segfault. If this Warning happens, it implies the gtk engine couldn't start and the app wouldn't run anyway (or could try and segfault). Also, you could just call exit after your print that message, it was just a correct template on how to proceed when importing gtk fails.
Hum, sorry if I'm wrong, but if I just call exit in a warning exception the programing will exit with any warning. Maybe some warning does not cause segfault.
> By this way we have to check if the waring is > associated to display too. Why ? Just checking for DISPLAY, like you proposed, doesn't solve this.
Because of what I say above I think we have to check display condition. Checking the if DISPLAY var is set and the system is *nix-like the problem is solved. I have just tested in my linux machine few minutes ago. Att, João Medeiros. _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Re: zenmap as root error Fyodor (Apr 01)
- Re: zenmap as root error João Medeiros (Apr 01)
- Re: zenmap as root error João Medeiros (Apr 01)
- Re: zenmap as root error Fyodor (Apr 01)
- Re: zenmap as root error Guilherme Polo (Apr 01)
- Re: zenmap as root error João Medeiros (Apr 01)
- Re: zenmap as root error Guilherme Polo (Apr 01)
- Re: zenmap as root error João Medeiros (Apr 01)
- Re: zenmap as root error Guilherme Polo (Apr 01)
- Re: zenmap as root error João Medeiros (Apr 01)
- Re: zenmap as root error Guilherme Polo (Apr 01)
- Re: zenmap as root error João Medeiros (Apr 01)
- Re: zenmap as root error Guilherme Polo (Apr 01)
- Re: zenmap as root error João Medeiros (Apr 01)
- Re: zenmap as root error David Fifield (Apr 22)
- <Possible follow-ups>
- RE: zenmap as root error Aaron Leininger (Apr 10)
- Re: zenmap as root error Diman Todorov (Apr 11)
- Re: zenmap as root error eldraco (Apr 11)
- Re: zenmap as root error Brandon Enright (Apr 11)
- Re: zenmap as root error Diman Todorov (Apr 11)