forked from openlp/openlp
fixed type() usage
bzr-revno: 2255
This commit is contained in:
commit
de43bfcf2d
@ -473,7 +473,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
This boolean is set to True when the list in the interface should be reloaded after saving the new images
|
||||
"""
|
||||
for filename in images_list:
|
||||
if type(filename) is not str and type(filename) is not unicode:
|
||||
if not isinstance(filename, basestring):
|
||||
continue
|
||||
log.debug(u'Adding new image: %s', filename)
|
||||
imageFile = ImageFilenames()
|
||||
|
@ -98,9 +98,9 @@ OPTIONAL_MODULES = [
|
||||
w = sys.stdout.write
|
||||
|
||||
def check_vers(version, required, text):
|
||||
if type(version) is not str:
|
||||
if not isinstance(version, str):
|
||||
version = '.'.join(map(str, version))
|
||||
if type(required) is not str:
|
||||
if not isinstance(required, str):
|
||||
required = '.'.join(map(str, required))
|
||||
w(' %s >= %s ... ' % (text, required))
|
||||
if LooseVersion(version) >= LooseVersion(required):
|
||||
|
Loading…
Reference in New Issue
Block a user