add try/except for startfile

This commit is contained in:
Marcos Pinto 2007-09-14 22:18:06 +00:00
parent 491e7ea0d6
commit dc71d16ac1
1 changed files with 4 additions and 1 deletions

View File

@ -95,7 +95,10 @@ class FilesTabManager(FilesBaseManager):
file_name = self.file_store.get_value( file_name = self.file_store.get_value(
self.file_store.get_iter(child_path), 0) self.file_store.get_iter(child_path), 0)
if windows_check(): if windows_check():
os.startfile(os.path.join(save_dir, file_name)) try:
os.startfile(os.path.join(save_dir, file_name))
except WindowsError:
pass
else: else:
exec_command(self.file_viewer, exec_command(self.file_viewer,
os.path.join(save_dir, file_name)) os.path.join(save_dir, file_name))