<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>blog.sidneidasilva.com &#187; wtf</title>
	<atom:link href="http://blog.sidneidasilva.com/category/wtf/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sidneidasilva.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Sep 2010 16:49:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.sidneidasilva.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9ed20a673cf8f74cf08f01d23fa6e0d5?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>blog.sidneidasilva.com &#187; wtf</title>
		<link>http://blog.sidneidasilva.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.sidneidasilva.com/osd.xml" title="blog.sidneidasilva.com" />
	<atom:link rel='hub' href='http://blog.sidneidasilva.com/?pushpress=hub'/>
		<item>
		<title>Pearls from the Plone Source (part 1)</title>
		<link>http://blog.sidneidasilva.com/2007/11/07/pearls-from-the-plone-source-part-1/</link>
		<comments>http://blog.sidneidasilva.com/2007/11/07/pearls-from-the-plone-source-part-1/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 18:41:53 +0000</pubDate>
		<dc:creator>Sidnei</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://awkly.org/2007/11/07/pearls-from-the-plone-source-part-1/</guid>
		<description><![CDATA[Ok, I&#8217;m fed up. Here&#8217;s the first of a series of Pearls from the Plone Source. Call it The Plone WTF if you like. Here goes, a loop that does nothing. Notice the &#8216;locking_info&#8217; adapter is fetched outside the for loop: for action in workflowActions:&#160;&#160;&#160; if action['category'] != &#8216;workflow&#8217;:&#160;&#160;&#160;&#160;&#160;&#160;&#160; continue locking_info = queryMultiAdapter((context, request), name=&#8217;plone_lock_info&#8217;) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sidneidasilva.com&amp;blog=232351&amp;post=239&amp;subd=omsg&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ok, I&#8217;m fed up. Here&#8217;s the first of a series of Pearls from the Plone Source. Call it The Plone WTF if you like.</p>
<p>Here goes, a loop that does nothing. Notice the &#8216;locking_info&#8217; adapter is fetched outside the for loop:</p>
<blockquote><p>for action in workflowActions:<br />&nbsp;&nbsp;&nbsp; if action['category'] != &#8216;workflow&#8217;:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; continue </p>
<p>locking_info = queryMultiAdapter((context, request), name=&#8217;plone_lock_info&#8217;)</p>
</blockquote>
<p>And then a few lines below, the same loop repeats, this time it is doing something. The &#8216;actionUrl&#8217; variable is assigned inside the for loop:<br />
<blockquote>
<p>if locking_info and locking_info.is_locked_for_current_user():<br />&nbsp;&nbsp;&nbsp; return []
<p>for action in workflowActions:<br />&nbsp;&nbsp;&nbsp; if action['category'] != &#8216;workflow&#8217;:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; continue<br />&nbsp;&nbsp;&nbsp; actionUrl = action['url']</p>
</blockquote>
<p>Sad. I don&#8217;t think anyone is really reviewing this code&#8230;.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/omsg.wordpress.com/239/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/omsg.wordpress.com/239/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/omsg.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/omsg.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/omsg.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/omsg.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/omsg.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/omsg.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/omsg.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/omsg.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/omsg.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/omsg.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/omsg.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/omsg.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/omsg.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/omsg.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sidneidasilva.com&amp;blog=232351&amp;post=239&amp;subd=omsg&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sidneidasilva.com/2007/11/07/pearls-from-the-plone-source-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/18268769213d24b741de807d6c350363?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sidnei</media:title>
		</media:content>
	</item>
	</channel>
</rss>