9hg / micolog

Automatically exported from code.google.com/p/micolog
MIT License
0 stars 0 forks source link

部署错误 #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. svn上新刷下来的代码,部署报错
What is the expected output? What do you see instead?
错误如下:
 File "E:\projects\micolog\model.py", line 569, in <module>
    gblog_init()
  File "E:\projects\micolog\model.py", line 563, in gblog_init
    g_blog.get_theme()
AttributeError: 'NoneType' object has no attribute 'get_theme'

出错原因:
def gblog_init():
    logging.info('module setting reloaded')
    global g_blog

    g_blog = Blog.get_by_key_name('default')
    if not g_blog:
        g_blog=InitBlogData()

    g_blog.get_theme()

    g_blog.rootdir=os.path.dirname(__file__)

    logging.info(g_blog.rootdir)
此方法中,对g_blog=InitBlogData()的调用,InitBlogData()函数没有返��
�值。

Original issue reported on code.google.com by fanzhen....@gmail.com on 19 Jun 2009 at 3:36

GoogleCodeExporter commented 8 years ago
这个该如何解决呢???

Original comment by nod...@gmail.com on 14 Jul 2009 at 2:46

GoogleCodeExporter commented 8 years ago
在InitBlogData()函数中,return g_blog就可以了。

Original comment by fanzhen....@gmail.com on 14 Jul 2009 at 4:21

GoogleCodeExporter commented 8 years ago

Original comment by coolch...@gmail.com on 1 Feb 2010 at 5:22

GoogleCodeExporter commented 8 years ago

Original comment by coolch...@gmail.com on 1 Feb 2010 at 5:23

GoogleCodeExporter commented 8 years ago

Original comment by coolch...@gmail.com on 1 Feb 2010 at 5:24