Changeset 8874b5b6ae9f67ac84b9717eb3ef2972413fc28c
- Timestamp:
- 03/17/07 00:12:02
(2 years ago)
- Author:
- Jason Michalski <armooo@armooo.net>
- git-committer:
- Jason Michalski <armooo@armooo.net> 1174108322 +0000
- git-parent:
[35fec23a00fb4f8b61e53a2d787b2331a616bb69]
- git-author:
- Jason Michalski <armooo@armooo.net> 1174108322 +0000
- Message:
-pyTivo
* Well that was easy dicts passed down fixes #4
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rcafe669 |
r8874b5b |
|
| 15 | 15 | self.daemon_threads = True |
|---|
| 16 | 16 | |
|---|
| 17 | | def add_container(self, name, type, path): |
|---|
| | 17 | def add_container(self, name, settings): |
|---|
| 18 | 18 | if self.containers.has_key(name) or name == 'TivoConnect': |
|---|
| 19 | 19 | raise "Container Name in use" |
|---|
| 20 | | self.containers[name] = {'type' : type, 'path' : path} |
|---|
| | 20 | self.containers[name] = settings |
|---|
| 21 | 21 | |
|---|
| 22 | 22 | class TivoHTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler): |
|---|
| r2668e11 |
r8874b5b |
|
| 12 | 12 | for section in config.sections(): |
|---|
| 13 | 13 | if not section == 'Server': |
|---|
| 14 | | httpd.add_container(section, config.get(section, 'type'), config.get(section, 'path')) |
|---|
| | 14 | settings = {} |
|---|
| | 15 | settings.update(config.items(section)) |
|---|
| | 16 | httpd.add_container(section, settings) |
|---|
| 15 | 17 | |
|---|
| 16 | 18 | b = beacon.Beacon() |
|---|
| … | … | |
| 22 | 24 | except KeyboardInterrupt: |
|---|
| 23 | 25 | b.stop() |
|---|
| | 26 | |
|---|