]> git.proxmox.com Git - mirror_linux-firmware.git/blobdiff - check_whence.py
check_whence: python3/utf-8 support
[mirror_linux-firmware.git] / check_whence.py
index 04f41dfc5f9e5976b2031a435bbf5d2bd00056b6..2d31f38391063f4c95ecc15e72e8f68fb3faa8c0 100755 (executable)
@@ -1,9 +1,10 @@
 #!/usr/bin/python
 
 import os, re, sys
+from io import open
 
 def list_whence():
-    with open('WHENCE') as whence:
+    with open('WHENCE', encoding='utf-8') as whence:
         for line in whence:
             match = re.match(r'(?:File|Source):\s*"(.*)"', line)
             if match: