Changeset 496f6c35599b4e4e36de1bc6d75ad66f0e3d3cb7
- Timestamp:
- 02/22/08 16:47:38
(11 months ago)
- Author:
- KRKeegan <-NOSPAM-kevin@krkeegan.com>
- git-committer:
- KRKeegan <-NOSPAM-kevin@krkeegan.com> 1203720458 -0800
- git-parent:
[da1a584094dfb0b9d6e3b7a9cfb0ab1be9f66620]
- git-author:
- KRKeegan <-NOSPAM-kevin@krkeegan.com> 1203720458 -0800
- Message:
Gracefully handle bad containers
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r07baf4f |
r496f6c3 |
|
| 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): |
|---|
| … | … | |
| 92 | 95 | tsncontainers = {} |
|---|
| 93 | 96 | for section, settings in tsnshares: |
|---|
| 94 | | settings['content_type'] = GetPlugin(settings['type']).CONTENT_TYPE |
|---|
| 95 | | tsncontainers[section] = settings |
|---|
| | 97 | try: |
|---|
| | 98 | settings['content_type'] = GetPlugin(settings['type']).CONTENT_TYPE |
|---|
| | 99 | tsncontainers[section] = settings |
|---|
| | 100 | except: |
|---|
| | 101 | None |
|---|
| 96 | 102 | t = Template(file=os.path.join(SCRIPTDIR, 'templates', |
|---|
| 97 | 103 | 'root_container.tmpl')) |
|---|