[LDTP-Dev] [Bug 352046] New: Throws up an exception error

LDTP (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sat Aug 19 09:24:43 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=352046
 LDTP | pythoncli | Ver: 0.5.x

           Summary: Throws up an exception error
           Product: LDTP
           Version: 0.5.x
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: pythoncli
        AssignedTo: ldtp-maint at gnome.bugs
        ReportedBy: lists at ashishr.net
         QAContact: ldtp-dev at lists.freedesktop.org
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Please describe the problem:
When I run the following program for automation of firefox codename minefield.
I get an exception.

Here is the program:

import sys
import os
from ldtputils import*

full_path = os.environ['HOME'] + '/firefox'
if os.path.isdir(full_path):
    print "Directory exists"
    full_path = full_path + '/firefox'
    if os.path.isfile(full_path):
            print "File exists"
            full_path = full_path + ' -P spooky'
            print full_path
            launchapp(full_path,1)
    else:
        print "Oops! no file"
        sys.exit(0)
else:
    print "Directory doesn't exist"
    sys.exit(0)

So, what I am doing here is, I am trying to check for the firefox directory
whether it exists in the $HOME directory of the user, then I check the file
firefox for existance. If the file exists I launch the firefox browser. So, if
when I check for directory and file, if it doesn't exist it throws up this
error 

ashish at ash:~/minefield$ python launch_file_menu.py
Directory doesn't exist
Unhandled exception in thread started by
Error in sys.excepthook:

Original exception was:

However, I comment out the ldtputils function launchapp blah blah and also from
ldtputils import*, then it works fine.

Steps to reproduce:
1. Move the firefox directory or rename the firefox file to ff or something
2. Run the script python blah.py
3. You can see the error message in the terminal


Actual results:
I get this error message 
ashish at ash:~/minefield$ python launch_file_menu.py
Directory doesn't exist
Unhandled exception in thread started by
Error in sys.excepthook:


Expected results:


Does this happen every time?


Other information:


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are watching the assignee for the bug.


More information about the LDTP-dev mailing list