summaryrefslogtreecommitdiff
path: root/pygments/unistring.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-08 09:21:15 +0200
committerGeorg Brandl <georg@python.org>2014-10-08 09:21:15 +0200
commit444fb6fd9b3492040a36fcca672fee8175f8d603 (patch)
tree2bd411ca78decf276b95dc6b1788e594b2e35287 /pygments/unistring.py
parent491fec23ef01687906f5d71ee718522cd2917926 (diff)
parentc1bfe4eed3805d3556bffa3c6b9cc2d3f6976205 (diff)
downloadpygments-444fb6fd9b3492040a36fcca672fee8175f8d603.tar.gz
Merged in leodemoura/pygments-main (pull request #399)
Diffstat (limited to 'pygments/unistring.py')
-rw-r--r--pygments/unistring.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/pygments/unistring.py b/pygments/unistring.py
index 3db3ae8e..c2a171dd 100644
--- a/pygments/unistring.py
+++ b/pygments/unistring.py
@@ -99,11 +99,8 @@ if __name__ == '__main__':
categories = {}
- f = open(__file__)
- try:
- content = f.read()
- finally:
- f.close()
+ with open(__file__) as fp:
+ content = fp.read()
header = content[:content.find('Cc =')]
footer = content[content.find("def combine("):]