fontconfig: Branch 'master'

[email protected] (Akira TAGOH)
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <[email protected]>
 fc-blanks/fc-blanks.py |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit a34db434c6a81f5286af07fabfef874492edb163
Author: Akira TAGOH <[email protected]>
Date:   Fri Jul 8 11:32:53 2016 +0900

    Fix some errors related to python3

diff --git a/fc-blanks/fc-blanks.py b/fc-blanks/fc-blanks.py
index b88a0aa..cc23cde 100755
--- a/fc-blanks/fc-blanks.py
+++ b/fc-blanks/fc-blanks.py
@@ -2,7 +2,13 @@
 
 from __future__ import absolute_import
 from __future__ import print_function
-import urllib2
+try:
+    from urllib2 import urlopen
+    from urllib2 import URLError
+except ImportError:
+    from urllib.request import urlopen
+    from urllib.error import URLError
+
 import sys
 import os
 from lxml import html
@@ -10,13 +16,13 @@ from six.moves import range
 
 datafile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'list-unicodeset.html')
 try:
-    fp = urllib2.urlopen('http://unicode.org/cldr/utility/list-unicodeset.jsp?a=[%3AGC%3DZs%3A][%3ADI%3A]&abb=on&ucd=on&esc=on&g')
+    fp = urlopen('http://unicode.org/cldr/utility/list-unicodeset.jsp?a=[%3AGC%3DZs%3A][%3ADI%3A]&abb=on&ucd=on&esc=on&g')
     data = fp.read()
     fp.close()
-    fp = open(datafile, 'w');
+    fp = open(datafile, 'wb');
     fp.write(data);
     fp.close();
-except urllib2.URLError:
+except URLError:
     # fall back reading the static data in repo
     try:
         fp = open(datafile)
_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.