|
From: <ren...@us...> - 2007-08-23 13:24:43
|
Revision: 829
http://gmyth.svn.sourceforge.net/gmyth/?rev=829&view=rev
Author: renatofilho
Date: 2007-08-23 06:24:46 -0700 (Thu, 23 Aug 2007)
Log Message:
-----------
created default config file to mantain compatibility
Modified Paths:
--------------
trunk/gmyth-stream/server/0.3/lib/gmsconfig.py
Added Paths:
-----------
trunk/gmyth-stream/server/0.3/server.conf
Modified: trunk/gmyth-stream/server/0.3/lib/gmsconfig.py
===================================================================
--- trunk/gmyth-stream/server/0.3/lib/gmsconfig.py 2007-08-22 16:57:16 UTC (rev 828)
+++ trunk/gmyth-stream/server/0.3/lib/gmsconfig.py 2007-08-23 13:24:46 UTC (rev 829)
@@ -14,21 +14,18 @@
class GmsConfig:
config = ConfigParser.ConfigParser()
__CONFIG_FILE__ = "server.conf"
+ __CONFIG_DIRS__ = [os.path.join (os.path.expanduser("~"), ".gms"), \
+ os.path.join ("/", "etc", "gms"), \
+ "."]
def __init__(self):
- file_name = os.path.join (os.path.expanduser("~"), ".gms", self.__CONFIG_FILE__)
- print "test config file: %s" % file_name
- if os.path.exists (file_name):
- fp = open (file_name, "r")
- self.config.readfp (fp)
- return
-
- file_name = os.path.join ("/", "etc", "gms", self.__CONFIG_FILE__)
- print "test config file: %s" % file_name
- if os.path.exists (file_name):
- fp = open (file_name, "r")
- self.config.readfp (fp)
- return
+ for path in self.__CONFIG_DIRS__:
+ file_name = os.path.join (path, self.__CONFIG_FILE__)
+ print "test config file: %s" % file_name
+ if os.path.exists (file_name):
+ fp = open (file_name, "r")
+ self.config.readfp (fp)
+ return
# __init__()
def get_transcoded_location (self):
Added: trunk/gmyth-stream/server/0.3/server.conf
===================================================================
--- trunk/gmyth-stream/server/0.3/server.conf (rev 0)
+++ trunk/gmyth-stream/server/0.3/server.conf 2007-08-23 13:24:46 UTC (rev 829)
@@ -0,0 +1,2 @@
+[PATHS]
+transcoded=.transcoded
Property changes on: trunk/gmyth-stream/server/0.3/server.conf
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|