Changeset 4ece09eb35ce84edccba693ba5b6dbeac35f7684
- Timestamp:
- 03/23/08 16:48:15
(10 months ago)
- Author:
- KRKeegan <-NOSPAM-kevin@krkeegan.com>
- git-committer:
- KRKeegan <-NOSPAM-kevin@krkeegan.com> 1206308895 -0700
- git-parent:
[f203746c577cb511d4af28c9b223bcf279a8715b]
- git-author:
- KRKeegan <-NOSPAM-kevin@krkeegan.com> 1206308895 -0700
- Message:
Add error message when incorrect MAK is entered
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r88bbc14 |
r4ece09e |
|
| 176 | 176 | handle = urllib2.urlopen(r) |
|---|
| 177 | 177 | except IOError, e: |
|---|
| 178 | | print "Possibly wrong Media Access Key, or IP address for your TiVo." |
|---|
| 179 | | handler.send_response(404) |
|---|
| | 178 | handler.send_response(200) |
|---|
| 180 | 179 | handler.end_headers() |
|---|
| | 180 | t = Template(file=os.path.join(SCRIPTDIR,'templates', 'redirect.tmpl')) |
|---|
| | 181 | t.container = cname |
|---|
| | 182 | t.time = '20' |
|---|
| | 183 | t.url = '/TiVoConnect?Command=NPL&Container=' + cname |
|---|
| | 184 | t.text = '<h3>Unable to Connect to TiVo.</h3> <br>pyTivo was unable to connect to the TiVo at ' + tivoIP +\ |
|---|
| | 185 | '<br>This most likely caused by an incorrect Media Access Key. Please return to the ToGo page and double check your Media Access Key.' +\ |
|---|
| | 186 | '<br> The <a href="/TiVoConnect?Command=NPL&Container='+ cname + '"> ToGo</a> page will reload in 20 seconds.' |
|---|
| | 187 | handler.wfile.write(t) |
|---|
| 181 | 188 | return |
|---|
| 182 | 189 | tivo_cache[theurl]['thepage'] = handle.read() |
|---|
| … | … | |
| 186 | 193 | handle = urllib2.urlopen(r) |
|---|
| 187 | 194 | except IOError, e: |
|---|
| 188 | | print "Possibly wrong Media Access Key, or IP address for your TiVo." |
|---|
| 189 | | handler.send_response(404) |
|---|
| | 195 | handler.send_response(200) |
|---|
| 190 | 196 | handler.end_headers() |
|---|
| | 197 | t = Template(file=os.path.join(SCRIPTDIR,'templates', 'redirect.tmpl')) |
|---|
| | 198 | t.container = cname |
|---|
| | 199 | t.time = '20' |
|---|
| | 200 | t.url = '/TiVoConnect?Command=NPL&Container=' + cname |
|---|
| | 201 | t.text = '<h3>Unable to Connect to TiVo.</h3> <br>pyTivo was unable to connect to the TiVo at ' + tivoIP +\ |
|---|
| | 202 | '<br>This most likely caused by an incorrect Media Access Key. Please return to the ToGo page and double check your Media Access Key.' +\ |
|---|
| | 203 | '<br> The <a href="/TiVoConnect?Command=NPL&Container='+ cname + '"> ToGo</a> page will reload in 20 seconds.' |
|---|
| | 204 | handler.wfile.write(t) |
|---|
| 191 | 205 | return |
|---|
| 192 | 206 | tivo_cache[theurl] = {} |
|---|