app.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:ravel 作者: ravel-net 项目源码 文件源码
def load(self, db):
        """Load the application from the specified database
           db: a ravel.db.RavelDb instance into which the application will be loaded"""
        if self.sqlfile is None:
            logger.debug("loaded application %s with no SQL file", self.name)
            return

        with open(self.sqlfile) as f:
            try:
                db.cursor.execute(f.read())
            except psycopg2.ProgrammingError, e:
                print "Error loading app {0}: {1}".format(self.name, e)

        logger.debug("loaded application %s", self.name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号