[Checkins] SVN: z3c.rml/trunk/src/z3c/rml/flowable.py Improve
condition check. Use recommended way and check for None.
Roger Ineichen
roger at projekt01.ch
Fri Mar 21 08:32:58 EDT 2008
Log message for revision 84838:
Improve condition check. Use recommended way and check for None.
I've go the following Warning in my tests with Report Lab Version:
RELEASE 2.1 at 15:00 GMT 24/May/2007
raise Exception("Subprocess error: %s" % error)
Exception: Subprocess error: ...\rml\flowable.py:863:
FutureWarning: The behavior of this method will change in future versions.
Use specific 'len(elem)' or 'elem is not None' test instead.
Changed:
U z3c.rml/trunk/src/z3c/rml/flowable.py
-=-
Modified: z3c.rml/trunk/src/z3c/rml/flowable.py
===================================================================
--- z3c.rml/trunk/src/z3c/rml/flowable.py 2008-03-21 09:37:15 UTC (rev 84837)
+++ z3c.rml/trunk/src/z3c/rml/flowable.py 2008-03-21 12:32:58 UTC (rev 84838)
@@ -860,14 +860,14 @@
# Get the header
ptoHeader = self.element.find('pto_header')
header = None
- if ptoHeader:
+ if ptoHeader is not None:
header = Flow(ptoHeader, self.parent)
header.process()
header = header.flow
# Get the trailer
ptoTrailer = self.element.find('pto_trailer')
trailer = None
- if ptoTrailer:
+ if ptoTrailer is not None:
trailer = Flow(ptoTrailer, self.parent)
trailer.process()
trailer = trailer.flow
More information about the Checkins
mailing list