Be more specific on excepts.
This commit is contained in:
parent
0551c9ddac
commit
03d68c0d26
|
@ -32,7 +32,7 @@ try:
|
|||
try:
|
||||
import osx.dbus
|
||||
osx.dbus.load(True)
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
import dbus
|
||||
import dbus.service
|
||||
|
|
|
@ -55,7 +55,7 @@ except ImportError:
|
|||
|
||||
try:
|
||||
from osx import nsapp
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
|
@ -574,7 +574,7 @@ def play_sound_file(path_to_soundfile):
|
|||
if sys.platform == 'darwin':
|
||||
try:
|
||||
nsapp.playFile(path_to_soundfile)
|
||||
except:
|
||||
except NameError:
|
||||
pass
|
||||
elif os.name == 'nt':
|
||||
try:
|
||||
|
|
|
@ -143,6 +143,7 @@ try:
|
|||
except Warning, msg:
|
||||
if str(msg) == 'could not open display':
|
||||
if sys.platform == 'darwin':
|
||||
# TODO: This starts also xterm by default. Find a better way
|
||||
os.system('/Applications/Utilities/X11.app/Contents/MacOS/X11 &')
|
||||
try:
|
||||
import gtk
|
||||
|
@ -611,7 +612,7 @@ def on_exit():
|
|||
try:
|
||||
import osx
|
||||
osx.shutdown()
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
import atexit
|
||||
|
@ -3475,7 +3476,7 @@ if __name__ == '__main__':
|
|||
try:
|
||||
import osx
|
||||
osx.init()
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
Interface()
|
||||
|
|
|
@ -63,7 +63,7 @@ from lastfm_track_listener import LastFMTrackListener
|
|||
|
||||
try:
|
||||
from osx import syncmenu
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
#(icon, name, type, jid, account, editable, second pixbuf)
|
||||
|
@ -4480,7 +4480,7 @@ class RosterWindow:
|
|||
if sys.platform == 'darwin':
|
||||
try:
|
||||
syncmenu.takeover_menu(self.xml.get_widget('menubar'))
|
||||
except:
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
self.actions_menu_needs_rebuild = False
|
||||
|
|
|
@ -29,7 +29,7 @@ from common import helpers
|
|||
if sys.platform == 'darwin':
|
||||
try:
|
||||
import osx
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
class StatusIcon(systray.Systray):
|
||||
|
|
Loading…
Reference in New Issue