Changeset 9fd49ce4e287e6c7eea04711a3a516c9ef19d343
- Timestamp:
- 03/27/08 20:24:00
(8 months ago)
- Author:
- Jason Michalski <armooo@armooo.net>
- git-committer:
- Jason Michalski <armooo@armooo.net> 1206667440 -0500
- git-parent:
[5bb7635909266f989a02a4f40c8bb646b09be670]
- git-author:
- Jason Michalski <armooo@armooo.net> 1206667440 -0500
- Message:
Create a random guid so so the tivo will always make a request on startup
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6413f2b |
r9fd49ce |
|
| 1 | 1 | import ConfigParser, os |
|---|
| 2 | 2 | import re |
|---|
| | 3 | import random |
|---|
| | 4 | import string |
|---|
| 3 | 5 | from ConfigParser import NoOptionError |
|---|
| 4 | 6 | |
|---|
| … | … | |
| 18 | 20 | def getGUID(): |
|---|
| 19 | 21 | if config.has_option('Server', 'GUID'): |
|---|
| 20 | | guid = config.get('Server', 'GUID') |
|---|
| | 22 | return config.get('Server', 'GUID') |
|---|
| 21 | 23 | else: |
|---|
| 22 | | guid = '123456' |
|---|
| | 24 | return [random.choice(string.letters) for i in range(10)] |
|---|
| 23 | 25 | return guid |
|---|
| 24 | 26 | |
|---|