[svn r829] created default config file to mantain compatibility trunk
authorrenatofilho
Thu Aug 23 14:24:46 2007 +0100 (2007-08-23)
branchtrunk
changeset 8238b729aff6f81
parent 822 c517a78bf7bf
child 824 e711a64ba03d
[svn r829] created default config file to mantain compatibility
gmyth-stream/server/0.3/lib/gmsconfig.py
gmyth-stream/server/0.3/server.conf
     1.1 --- a/gmyth-stream/server/0.3/lib/gmsconfig.py	Wed Aug 22 17:57:16 2007 +0100
     1.2 +++ b/gmyth-stream/server/0.3/lib/gmsconfig.py	Thu Aug 23 14:24:46 2007 +0100
     1.3 @@ -14,21 +14,18 @@
     1.4  class GmsConfig:
     1.5      config = ConfigParser.ConfigParser()
     1.6      __CONFIG_FILE__ = "server.conf"
     1.7 +    __CONFIG_DIRS__ =  [os.path.join (os.path.expanduser("~"), ".gms"), \
     1.8 +                       os.path.join ("/", "etc", "gms"), \
     1.9 +                       "."]
    1.10  
    1.11      def __init__(self):
    1.12 -        file_name = os.path.join (os.path.expanduser("~"), ".gms", self.__CONFIG_FILE__)
    1.13 -        print "test config file: %s" % file_name
    1.14 -        if os.path.exists (file_name):
    1.15 -            fp = open (file_name, "r")
    1.16 -            self.config.readfp (fp)
    1.17 -            return
    1.18 -
    1.19 -        file_name = os.path.join ("/", "etc", "gms", self.__CONFIG_FILE__)
    1.20 -        print "test config file: %s" % file_name
    1.21 -        if os.path.exists (file_name):
    1.22 -            fp = open (file_name, "r")
    1.23 -            self.config.readfp (fp)
    1.24 -            return
    1.25 +        for path in self.__CONFIG_DIRS__:
    1.26 +            file_name = os.path.join (path, self.__CONFIG_FILE__)
    1.27 +            print "test config file: %s" % file_name
    1.28 +            if os.path.exists (file_name):
    1.29 +                fp = open (file_name, "r")
    1.30 +                self.config.readfp (fp)
    1.31 +                return
    1.32      # __init__()
    1.33  
    1.34      def get_transcoded_location (self):
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/gmyth-stream/server/0.3/server.conf	Thu Aug 23 14:24:46 2007 +0100
     2.3 @@ -0,0 +1,2 @@
     2.4 +[PATHS]
     2.5 +transcoded=.transcoded