add amissing else

This commit is contained in:
Nikos Kouremenos 2005-08-11 12:36:32 +00:00
parent d0c81a9b8f
commit 2cb711b720
1 changed files with 15 additions and 14 deletions

View File

@ -221,20 +221,21 @@ def launch_file_manager(path_to_open):
os.startfile(path_to_open) # if pywin32 is installed we open os.startfile(path_to_open) # if pywin32 is installed we open
except: except:
pass pass
if gajim.config.get('openwith') == 'gnome-open': else:
command = 'gnome-open' if gajim.config.get('openwith') == 'gnome-open':
elif gajim.config.get('openwith') == 'kfmclient exec': command = 'gnome-open'
command = 'kfmclient exec' elif gajim.config.get('openwith') == 'kfmclient exec':
elif gajim.config.get('openwith') == 'custom': command = 'kfmclient exec'
command = gajim.config.get('custom_file_manager') elif gajim.config.get('openwith') == 'custom':
if command == '': # if no app is configured command = gajim.config.get('custom_file_manager')
return if command == '': # if no app is configured
# we add the path in "" so we have good parsing from shell return
command = command + ' "' + uri + '" &' # we add the path in "" so we have good parsing from shell
try: #FIXME: when we require python2.4+ use subprocess module command = command + ' "' + path_to_open + '" &'
os.system(command) try: #FIXME: when we require python2.4+ use subprocess module
except: os.system(command)
pass except:
pass
def play_sound(event): def play_sound(event):
if not gajim.config.get('sounds_on'): if not gajim.config.get('sounds_on'):