# HG changeset patch # User melunko # Date 1187897051 -3600 # Node ID e711a64ba03d50df10927b7a6473bdcdcc2d64fd # Parent 8b729aff6f81c12343da52294b0c15e46bc44879 [svn r830] fixed config file to expand dir diff -r 8b729aff6f81 -r e711a64ba03d gmyth-stream/server/0.3/lib/gmsconfig.py --- a/gmyth-stream/server/0.3/lib/gmsconfig.py Thu Aug 23 14:24:46 2007 +0100 +++ b/gmyth-stream/server/0.3/lib/gmsconfig.py Thu Aug 23 20:24:11 2007 +0100 @@ -16,12 +16,11 @@ __CONFIG_FILE__ = "server.conf" __CONFIG_DIRS__ = [os.path.join (os.path.expanduser("~"), ".gms"), \ os.path.join ("/", "etc", "gms"), \ - "."] + "."] def __init__(self): 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) @@ -30,7 +29,7 @@ def get_transcoded_location (self): try: - return self.config.get("PATHS", "transcoded") + return os.path.realpath (self.config.get("PATHS", "transcoded")) except: return None # get_transcoded_location() diff -r 8b729aff6f81 -r e711a64ba03d gmyth-stream/server/0.3/lib/request_handler.py --- a/gmyth-stream/server/0.3/lib/request_handler.py Thu Aug 23 14:24:46 2007 +0100 +++ b/gmyth-stream/server/0.3/lib/request_handler.py Thu Aug 23 20:24:11 2007 +0100 @@ -355,8 +355,12 @@ # serve_file_info() def serve_stream(self, body): - filename = self.query.get("file", None)[0] + args = self.query.get("file", None) + if not args: + self.send_error(404, "File not found") + return + filename = args[0]; if not filename: self.send_error(404, "File not found") return diff -r 8b729aff6f81 -r e711a64ba03d gmyth-stream/server/0.3/server.conf --- a/gmyth-stream/server/0.3/server.conf Thu Aug 23 14:24:46 2007 +0100 +++ b/gmyth-stream/server/0.3/server.conf Thu Aug 23 20:24:11 2007 +0100 @@ -1,2 +1,2 @@ [PATHS] -transcoded=.transcoded +transcoded=./.transcoded