From: Ed Page Date: Tue, 28 Sep 2010 02:30:03 +0000 (-0500) Subject: Fixing an issue with finding images X-Git-Url: http://git.maemo.org/git/?p=watersofshiloah;a=commitdiff_plain;h=763a4a8613043a606df4dba9f5487f74b85cb607;hp=9bf60cf6c822b817a8882fdb3db182bd7a7bb3e8 Fixing an issue with finding images --- diff --git a/src/watersofshiloah_gtk.py b/src/watersofshiloah_gtk.py index 5f442f9..ad25b6c 100755 --- a/src/watersofshiloah_gtk.py +++ b/src/watersofshiloah_gtk.py @@ -18,7 +18,8 @@ import dbus.mainloop.glib import gtk try: - import osso + import osso as _osso + osso = _osso except ImportError: osso = None @@ -41,7 +42,10 @@ class WatersOfShiloahProgram(hildonize.get_app_class()): def __init__(self): super(WatersOfShiloahProgram, self).__init__() currentPath = os.path.abspath(__file__) - storePath = os.path.join(os.path.split(os.path.dirname(currentPath))[0], "data") + for dirName in ["share", "data"]: + storePath = os.path.join(os.path.split(os.path.dirname(currentPath))[0], dirName) + if os.path.isdir(storePath): + break self._store = imagestore.ImageStore(storePath, constants._cache_path_) self._index = stream_index.AudioIndex() self._player = player.Player(self._index)