After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 352046 - Throws up an exception error
Throws up an exception error
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: pythoncli
0.5.x
Other All
: Normal normal
: ---
Assigned To: LDTP maintainers
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2006-08-19 16:24 UTC by Ashish R
Modified: 2008-01-17 23:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ashish R 2006-08-19 16:24:17 UTC
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@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@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:
Comment 1 Nagappan Alagappan 2008-01-17 23:03:23 UTC
Could you try with latest version in CVS and update this bug ?