pass "" in os.system after command (so shell dont touch the argument) Also added a fixme for when we go 2.4+ so we can use subproccess module
This commit is contained in:
parent
fd0bfbc59b
commit
3dbe1ccd23
13
src/gajim.py
13
src/gajim.py
|
@ -129,10 +129,10 @@ class Interface:
|
|||
#kind = 'url' or 'mail'
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
os.startfile(url) # if pywin32 is installed we open
|
||||
os.startfile(uri) # if pywin32 is installed we open
|
||||
except:
|
||||
pass
|
||||
return
|
||||
else:
|
||||
if gajim.config.get('openwith') == 'gnome-open':
|
||||
command = 'gnome-open'
|
||||
elif gajim.config.get('openwith') == 'kfmclient exec':
|
||||
|
@ -144,8 +144,9 @@ class Interface:
|
|||
command = gajim.config.get('custommailapp')
|
||||
if command == '': # if no app is configured
|
||||
return
|
||||
command = command + ' ' + uri + ' &'
|
||||
try:
|
||||
# we add the uri in "" so we have good parsing from shell
|
||||
command = command + ' "' + uri + '" &'
|
||||
try: #FIXME: when we require 2.4+ use subprocess module
|
||||
os.system(command)
|
||||
except:
|
||||
pass
|
||||
|
@ -166,7 +167,9 @@ class Interface:
|
|||
if gajim.config.get('soundplayer') == '':
|
||||
return
|
||||
player = gajim.config.get('soundplayer')
|
||||
command = player + ' ' + path_to_soundfile + ' &'
|
||||
# we add the path in "" so we have good parsing from shell
|
||||
command = player + ' "' + path_to_soundfile + '" &'
|
||||
#FIXME: when we require 2.4+ use subprocess module
|
||||
os.system(command)
|
||||
|
||||
def handle_event_roster(self, account, data):
|
||||
|
|
Loading…
Reference in New Issue