executers.py 文件源码

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

项目:sql-updater 作者: hive-tools 项目源码 文件源码
def execute(self, project):
        modified_files = project.diff()

        if modified_files:
            print '%d files has been modified' % len(modified_files)

            for _file in modified_files:
                if _file.change_type in ['D', 'M']:
                    word = 'New' if _file.change_type == 'D' else 'Modified'
                    print "- %s " % word + colored(_file.file_path, "green")

                    buffer = open_file(_file.file_path)

                    try:
                        self._create_tables(buffer, _file.file_path)
                        #   self.update_lock(project)
                    except ValueError, e:
                        raise e
        else:
            print 'Everything up to date'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号