Changeset 0a337559fdb9b05ffb86e6483b94ccb79b1a076e
- Timestamp:
- 02/22/08 20:27:22 (11 months ago)
- git-parent:
[cb23b422179e7bb9b29711404178b3a51bb68e4e], [16a0f4539b8154b6a3876252260004f2614c07da]
- Files:
-
- httpserver.py (modified) (3 diffs)
- plugins/photo/photo.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
httpserver.py
rcb23b42 r0a33755 34 34 if self.containers.has_key(name) or name == 'TiVoConnect': 35 35 raise "Container Name in use" 36 settings['content_type'] = GetPlugin(settings['type']).CONTENT_TYPE 37 self.containers[name] = settings 36 try: 37 settings['content_type'] = GetPlugin(settings['type']).CONTENT_TYPE 38 self.containers[name] = settings 39 except KeyError: 40 print 'Unable to add container', name 38 41 39 42 class TivoHTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler): … … 82 85 method = getattr(plugin, command) 83 86 method(self, query) 87 return 84 88 else: 85 89 self.unsupported(query) 90 return 86 91 break 92 93 #if we made it here it means we couldn't match the request to anything. 94 self.unsupported(query) 95 return 87 96 else: 88 97 self.unsupported(query) … … 93 102 tsncontainers = {} 94 103 for section, settings in tsnshares: 95 settings['content_type'] = GetPlugin(settings['type']).CONTENT_TYPE 96 tsncontainers[section] = settings 104 try: 105 settings['content_type'] = GetPlugin(settings['type']).CONTENT_TYPE 106 tsncontainers[section] = settings 107 except: 108 None 97 109 t = Template(file=os.path.join(SCRIPTDIR, 'templates', 98 110 'root_container.tmpl')) plugins/photo/photo.py
re8d346b rda1a584 25 25 # Version 0.1, Dec. 7, 2007 26 26 27 import os, re, random, urllib, threading, time, cgi 28 import Image 27 import os, re, random, urllib, threading, time, cgi, sys 28 try: 29 import Image 30 except ImportError: 31 print 'Photo Plugin Error: The python Imaging Library is not installed' 32 sys.exit(1) 29 33 from cStringIO import StringIO 30 34 from Cheetah.Template import Template
