1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 08:16:07 +00:00

Added captcha to thirdpart

This commit is contained in:
zhengxie
2013-11-09 10:42:06 +08:00
parent e6867f56f2
commit a611d11088
30 changed files with 1402 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import re
VERSION = (0, 4, 0)
def get_version(svn=False):
"Returns the version as a human-format string."
return '.'.join([str(i) for i in VERSION])
def pillow_required():
def pil_version(version):
try:
return int(re.compile('[^\d]').sub('', version))
except:
return 116
try:
from PIL import Image, ImageDraw, ImageFont
except ImportError:
try:
import Image
import ImageDraw
import ImageFont
except ImportError:
return True
return pil_version(Image.VERSION) < 116