Mercurial > p > roundup > code
comparison roundup/cgi/TAL/HTMLTALParser.py @ 5248:198b6e810c67
Use Python-3-compatible 'as' syntax for except statements
Many raise statements near these are also fixed.
So are two ivorrect file encoding marks ('utf8'->'utf-8').
| author | Eric S. Raymond <esr@thyrsus.com> |
|---|---|
| date | Thu, 24 Aug 2017 22:21:37 -0400 |
| parents | 8c2402a78bb0 |
| children | 12fe83f90f0d |
comparison
equal
deleted
inserted
replaced
| 5247:7f00a47b3559 | 5248:198b6e810c67 |
|---|---|
| 116 f = open(file) | 116 f = open(file) |
| 117 data = f.read() | 117 data = f.read() |
| 118 f.close() | 118 f.close() |
| 119 try: | 119 try: |
| 120 self.parseString(data) | 120 self.parseString(data) |
| 121 except TALError, e: | 121 except TALError as e: |
| 122 e.setFile(file) | 122 e.setFile(file) |
| 123 raise | 123 raise |
| 124 | 124 |
| 125 def parseString(self, data): | 125 def parseString(self, data): |
| 126 self.feed(data) | 126 self.feed(data) |
