2011-03-30 34 views
0

我正在使用python路徑包(http://routes.groovie.org/modules/mapper.html#routes.mapper.Mapper.connect)python中routes.mapper包的問題 - generate由於某種原因返回None?

而且我簡化了我的代碼到下面:

from routes import Mapper 
m = Mapper() 
m.connect('upnp/:udn/:sid/:action', controller='upnp', action='desc', sid=None) 
a = m.generate(controller='upnp', action='desc', udn='uuid:1234', sid=None) 
print '---' 
print a 
print '---' 

現在,我認爲它應該打印出'/ upnp/uuid:1234/None/desc',但生成返回無。

任何想法出了什麼問題?

非常感謝

回答

0

找出原因:生成線中的sid = None。

相關問題