public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in games-simulation/singularity/files: singularity-0.26a-musicdir.patch
@ 2007-10-14  7:26 Michael Sterrett (mr_bones_)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Sterrett (mr_bones_) @ 2007-10-14  7:26 UTC (permalink / raw
  To: gentoo-commits

mr_bones_    07/10/14 07:26:58

  Added:                singularity-0.26a-musicdir.patch
  Log:
  make music optional at upstream request (bug #195447)
  (Portage version: 2.1.3.9)

Revision  Changes    Path
1.1                  games-simulation/singularity/files/singularity-0.26a-musicdir.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-simulation/singularity/files/singularity-0.26a-musicdir.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/games-simulation/singularity/files/singularity-0.26a-musicdir.patch?rev=1.1&content-type=text/plain

Index: singularity-0.26a-musicdir.patch
===================================================================
Index: code/g.py
===================================================================
--- code/g.py   (revision 406)
+++ code/g.py   (revision 407)
@@ -142,14 +142,21 @@
     musicarray = []
     musicarraylen=0
     musicpath=path.join(data_loc, "..", "music")
+    default_music_available = True
     if not path.isdir(musicpath):
-        makedirs(musicpath)
-    temp_ls = listdir(musicpath)
-    temp_ls_len = len(temp_ls)
-    for file_name in temp_ls:
-        if file_name[-3:] == "ogg" or file_name[-3:] == "mp3":
-            musicarray.append(path.join(musicpath, file_name))
+        try:
+            makedirs(musicpath)
+        except:

+            # We don't have permission to write here.  Don't bother
+            # trying to load music.
+            default_music_available = False
+
+    if default_music_available:
+        for file_name in listdir(musicpath):
+            if file_name[-3:] == "ogg" or file_name[-3:] == "mp3":
+                musicarray.append(path.join(musicpath, file_name))
+
     #also, grab any user files
     musicpath=path.join(get_save_folder(True), "music")
     if not path.isdir(musicpath):



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in games-simulation/singularity/files: singularity-0.26a-musicdir.patch
@ 2008-06-20 18:07 Michael Sterrett (mr_bones_)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Sterrett (mr_bones_) @ 2008-06-20 18:07 UTC (permalink / raw
  To: gentoo-commits

mr_bones_    08/06/20 18:07:36

  Removed:              singularity-0.26a-musicdir.patch
  Log:
  old
  (Portage version: 2.1.4.4)
-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-20 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20 18:07 [gentoo-commits] gentoo-x86 commit in games-simulation/singularity/files: singularity-0.26a-musicdir.patch Michael Sterrett (mr_bones_)
  -- strict thread matches above, loose matches on Subject: below --
2007-10-14  7:26 Michael Sterrett (mr_bones_)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox