Mercurial > p > roundup > code
comparison setup.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 | 0b557e27a5e4 |
| children | dca36294a733 |
comparison
equal
deleted
inserted
replaced
| 5247:7f00a47b3559 | 5248:198b6e810c67 |
|---|---|
| 108 # http://bugs.python.org/issue10945 | 108 # http://bugs.python.org/issue10945 |
| 109 long_description=open('doc/announcement.txt').read() | 109 long_description=open('doc/announcement.txt').read() |
| 110 try: | 110 try: |
| 111 # attempt to interpret string as 'ascii' | 111 # attempt to interpret string as 'ascii' |
| 112 long_description = long_description.encode('ascii') | 112 long_description = long_description.encode('ascii') |
| 113 except UnicodeEncodeError, cause: | 113 except UnicodeEncodeError as cause: |
| 114 print >> sys.stderr, "doc/announcement.txt contains non-ascii: %s" \ | 114 print >> sys.stderr, "doc/announcement.txt contains non-ascii: %s" \ |
| 115 % cause | 115 % cause |
| 116 sys.exit(42) | 116 sys.exit(42) |
| 117 | 117 |
| 118 setup(name='roundup', | 118 setup(name='roundup', |
