conduit r1681 - in trunk: . conduit



Author: jstowers
Date: Fri Aug 29 01:04:46 2008
New Revision: 1681
URL: http://svn.gnome.org/viewvc/conduit?rev=1681&view=rev

Log:
	* conduit/TypeConverter.py: Dont keep recursing if an intermediate
	conversion fails. Fixes #549751


Modified:
   trunk/   (props changed)
   trunk/ChangeLog
   trunk/conduit/TypeConverter.py

Modified: trunk/conduit/TypeConverter.py
==============================================================================
--- trunk/conduit/TypeConverter.py	(original)
+++ trunk/conduit/TypeConverter.py	Fri Aug 29 01:04:46 2008
@@ -158,16 +158,15 @@
         return False
         
     def _convert(self, conversions, data):
-        if len(conversions) > 0:
+        if data and len(conversions) > 0:
             from_type, to_type, args = conversions[0]
             message = "Converting"
             if from_type == to_type:
                 message = "Transcoding"
                 #No conversion needed, or module does not supply transcode.
                 if args == {} or not self._conversion_exists(from_type, to_type):
-                    #recurse
                     log.debug("Skipping %s -> %s" % (from_type, to_type))
-                    return self._convert(conversions[1:],data)
+                    return data
 
             log.debug("%s %s -> %s (args: %s)" % (message, from_type, to_type, args))
             try:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]