Files
for-gentoo/net-misc/pyload/files/pyload-0.4.9-PIL.patch
T
2013-09-13 17:01:03 +02:00

71 lines
2.5 KiB
Diff

diff -Nurp pyload.orig/module/plugins/captcha/captcha.py pyload/module/plugins/captcha/captcha.py
--- pyload.orig/module/plugins/captcha/captcha.py 2013-09-13 16:54:51.163193038 +0200
+++ pyload/module/plugins/captcha/captcha.py 2013-09-13 16:56:08.069857571 +0200
@@ -25,11 +25,11 @@ import logging
import subprocess
#import tempfile
-import Image
-import TiffImagePlugin
-import PngImagePlugin
-import GifImagePlugin
-import JpegImagePlugin
+from PIL import Image
+from PIL import TiffImagePlugin
+from PIL import PngImagePlugin
+from PIL import GifImagePlugin
+from PIL import JpegImagePlugin
class OCR(object):
diff -Nurp pyload.orig/module/plugins/captcha/LinksaveIn.py pyload/module/plugins/captcha/LinksaveIn.py
--- pyload.orig/module/plugins/captcha/LinksaveIn.py 2013-09-13 16:54:51.163193038 +0200
+++ pyload/module/plugins/captcha/LinksaveIn.py 2013-09-13 16:56:19.183190597 +0200
@@ -1,5 +1,5 @@
from captcha import OCR
-import Image
+from PIL import Image
from os import sep
from os.path import dirname
from os.path import abspath
diff -Nurp pyload.orig/module/plugins/hooks/CaptchaBrotherhood.py pyload/module/plugins/hooks/CaptchaBrotherhood.py
--- pyload.orig/module/plugins/hooks/CaptchaBrotherhood.py 2013-09-13 16:54:51.159859705 +0200
+++ pyload/module/plugins/hooks/CaptchaBrotherhood.py 2013-09-13 16:55:59.156524486 +0200
@@ -23,7 +23,7 @@ import pycurl
import StringIO
from urllib import urlencode
from time import sleep
-import Image
+from PIL import Image
from pyload.network.RequestFactory import getURL, getRequest
from pyload.network.HTTPRequest import BadHeader
@@ -166,4 +166,4 @@ class CaptchaBrotherhood(Hook):
return
task.data["ticket"] = ticket
- task.setResult(result)
\ Brak znaku nowej linii na końcu pliku
+ task.setResult(result)
diff -Nurp pyload.orig/systemCheck.py pyload/systemCheck.py
--- pyload.orig/systemCheck.py 2013-09-13 16:54:51.153193038 +0200
+++ pyload/systemCheck.py 2013-09-13 16:55:43.853191577 +0200
@@ -32,7 +32,7 @@ def main():
print("OpenSSL:", "missing")
try:
- import Image
+ from PIL import Image
print("image libary:", Image.VERSION)
except:
print("image libary:", "missing")
@@ -67,7 +67,7 @@ def main():
core_err.append("Your py-curl version is to old, please upgrade!")
try:
- import Image
+ from PIL import Image
except:
core_err.append("Please install py-imaging/pil to use Hoster, which uses captchas.")