Show More
@@ -280,8 +280,7 b' class FileLink(object):' | |||
|
280 | 280 | text to append at the end of link [default: '<br>'] |
|
281 | 281 | """ |
|
282 | 282 | if isdir(path): |
|
283 | raise ValueError,\ | |
|
284 | ("Cannot display a directory using FileLink. " | |
|
283 | raise ValueError("Cannot display a directory using FileLink. " | |
|
285 | 284 | "Use FileLinks to display '%s'." % path) |
|
286 | 285 | self.path = path |
|
287 | 286 | self.url_prefix = url_prefix |
@@ -366,8 +365,7 b' class FileLinks(FileLink):' | |||
|
366 | 365 | |
|
367 | 366 | """ |
|
368 | 367 | if isfile(path): |
|
369 | raise ValueError,\ | |
|
370 | ("Cannot display a file using FileLinks. " | |
|
368 | raise ValueError("Cannot display a file using FileLinks. " | |
|
371 | 369 | "Use FileLink to display '%s'." % path) |
|
372 | 370 | self.included_suffixes = included_suffixes |
|
373 | 371 | # remove trailing slashs for more consistent output formatting |
@@ -308,7 +308,7 b' def generate_tokens(readline):' | |||
|
308 | 308 | |
|
309 | 309 | if contstr: # continued string |
|
310 | 310 | if not line: |
|
311 |
raise TokenError |
|
|
311 | raise TokenError("EOF in multi-line string", strstart) | |
|
312 | 312 | endmatch = endprog.match(line) |
|
313 | 313 | if endmatch: |
|
314 | 314 | pos = end = endmatch.end(0) |
@@ -369,7 +369,7 b' def generate_tokens(readline):' | |||
|
369 | 369 | |
|
370 | 370 | else: # continued statement |
|
371 | 371 | if not line: |
|
372 |
raise TokenError |
|
|
372 | raise TokenError("EOF in multi-line statement", (lnum, 0)) | |
|
373 | 373 | continued = 0 |
|
374 | 374 | |
|
375 | 375 | while pos < max: |
General Comments 0
You need to be logged in to leave comments.
Login now