Ver código fonte

no big change

rachels 3 anos atrás
pai
commit
7e0efa497c
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1 2
      tools/check_images3.py

+ 1 - 2
tools/check_images3.py

@@ -30,8 +30,7 @@ for name in os.listdir("locations"):
         )
         text = ifile.read()
         for match in re.finditer(r"images.+?[.](gif|jpg|png|mp4)", text, flags=re.U):
-            imgfile = match.group().encode("utf-8")
-            imgfile = imgfile.decode('utf-8')
+            imgfile = match.group().encode("utf-8").decode()
             randmatch = re.search(r"'\s*[+]\s*rand\s*[(]\s*(\d+)\s*[,]\s*(\d+)\s*[)]\s*[+]\s*'", imgfile)
             if randmatch != None:
                 for i in range(int(randmatch.group(1)), 1+int(randmatch.group(2))):