Skip to content

Commit

Permalink
Import Image from PIL namespace instead of deprecated standard namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
lxp committed Mar 6, 2019
1 parent 5a14438 commit 2f5df43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cfv/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ def getimagedimensions(filename):
if filename == '':
return '0','0'
try:
import Image
from PIL import Image
im1=Image.open(filename)
return map(str, im1.size)
except (ImportError, IOError):
Expand Down Expand Up @@ -1554,7 +1554,7 @@ def make_chksumfile_create(self, filename):
file.write('Generated at: %s'%(time.strftime('%a, %d %b %Y %H:%M:%S',time.gmtime(time.time())))+os.linesep)
file.write('Find it at: '+__homepage__+os.linesep+os.linesep)
try:
import Image
from PIL import Image
self.use_dimensions=1 ####should this be made optional somehow?
except ImportError:
self.use_dimensions=0
Expand Down

0 comments on commit 2f5df43

Please sign in to comment.