GNOME Bugzilla – Bug 352046
Throws up an exception error
Last modified: 2008-01-17 23:03:23 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:
Could you try with latest version in CVS and update this bug ?