# HG changeset patch # User renatofilho # Date 1187875486 -3600 # Node ID 8b729aff6f81c12343da52294b0c15e46bc44879 # Parent c517a78bf7bfbc1c9f1090334479a6146abfa19c [svn r829] created default config file to mantain compatibility diff -r c517a78bf7bf -r 8b729aff6f81 gmyth-stream/server/0.3/lib/gmsconfig.py --- a/gmyth-stream/server/0.3/lib/gmsconfig.py Wed Aug 22 17:57:16 2007 +0100 +++ b/gmyth-stream/server/0.3/lib/gmsconfig.py Thu Aug 23 14:24:46 2007 +0100 @@ -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): diff -r c517a78bf7bf -r 8b729aff6f81 gmyth-stream/server/0.3/server.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gmyth-stream/server/0.3/server.conf Thu Aug 23 14:24:46 2007 +0100 @@ -0,0 +1,2 @@ +[PATHS] +transcoded=.transcoded