[xiph-cvs] cvs commit: positron/scripts positron

Stan Seibert volsung at xiph.org
Tue Jun 10 19:00:25 PDT 2003



volsung     03/06/10 22:00:25

  Modified:    scripts  positron
  Log:
  Warn users if they enable Ogg Vorbis support without the required modules.

Revision  Changes    Path
1.7       +18 -0     positron/scripts/positron

Index: positron
===================================================================
RCS file: /usr/local/cvsroot/positron/scripts/positron,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- positron	28 May 2003 15:57:15 -0000	1.6
+++ positron	11 Jun 2003 02:00:25 -0000	1.7
@@ -65,6 +65,21 @@
     print
     print "For more help on a specific command, type: positron help <command>"
 
+def oggvorbis_sanity_check():
+    try:
+        import ogg.vorbis
+    except ImportError:
+        print """
+********************************************************************
+WARNING: You have enabled Ogg Vorbis support in your configuration
+file, but do not have pyogg and pyvorbis installed, so Ogg
+Vorbis support is not available.
+
+Please go to the positron homepage to download pyogg and pyvorbis:
+
+http://www.xiph.org/positron/
+********************************************************************
+"""
 
 def main(argv):
     options = "c:hm:v"
@@ -139,6 +154,9 @@
         if commands.has_key(remaining[0]):
             (cmd, display_order) = commands[remaining[0]]
             cmd.run(config, myNeuros, remaining[1:])
+
+            if config.oggvorbis_support:
+                oggvorbis_sanity_check()
         else:
             print remaining[0], "is not a valid command."
             print

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list