← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/type-usage into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/type-usage into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol/openlp/type-usage/+merge/169704

clean up
-- 
https://code.launchpad.net/~googol/openlp/type-usage/+merge/169704
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/type-usage into lp:openlp.
=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2013-05-14 15:05:41 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2013-06-16 19:46:27 +0000
@@ -473,7 +473,7 @@
             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()

=== modified file 'scripts/check_dependencies.py'
--- scripts/check_dependencies.py	2013-04-23 21:47:02 +0000
+++ scripts/check_dependencies.py	2013-06-16 19:46:27 +0000
@@ -98,9 +98,9 @@
 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):


Follow ups