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'
|
#kind = 'url' or 'mail'
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
try:
|
try:
|
||||||
os.startfile(url) # if pywin32 is installed we open
|
os.startfile(uri) # if pywin32 is installed we open
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return
|
else:
|
||||||
if gajim.config.get('openwith') == 'gnome-open':
|
if gajim.config.get('openwith') == 'gnome-open':
|
||||||
command = 'gnome-open'
|
command = 'gnome-open'
|
||||||
elif gajim.config.get('openwith') == 'kfmclient exec':
|
elif gajim.config.get('openwith') == 'kfmclient exec':
|
||||||
|
@ -144,8 +144,9 @@ class Interface:
|
||||||
command = gajim.config.get('custommailapp')
|
command = gajim.config.get('custommailapp')
|
||||||
if command == '': # if no app is configured
|
if command == '': # if no app is configured
|
||||||
return
|
return
|
||||||
command = command + ' ' + uri + ' &'
|
# we add the uri in "" so we have good parsing from shell
|
||||||
try:
|
command = command + ' "' + uri + '" &'
|
||||||
|
try: #FIXME: when we require 2.4+ use subprocess module
|
||||||
os.system(command)
|
os.system(command)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
@ -166,7 +167,9 @@ class Interface:
|
||||||
if gajim.config.get('soundplayer') == '':
|
if gajim.config.get('soundplayer') == '':
|
||||||
return
|
return
|
||||||
player = gajim.config.get('soundplayer')
|
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)
|
os.system(command)
|
||||||
|
|
||||||
def handle_event_roster(self, account, data):
|
def handle_event_roster(self, account, data):
|
||||||
|
|
Loading…
Reference in New Issue