示例#1
0
文件: int_cli.py 项目: shish/chunker
    def main_loop(self):
        #self.mn = MetaNet(self.config)

        log("Activating repos")
        for repo in self.repos:
            log("Activating %s" % repo)
            repo.start()

        while True:
            try:
                cmd = raw_input("chunker> ")
                data = self.do(cmd.split())
            #except ArgParseException as e:
            #    print e.message
            except (KeyboardInterrupt, EOFError) as e:
                break
            except Exception as e:
                data = {"status": "error", "message": str(e)}
            print json.dumps(data, indent=4)
示例#2
0
 def test(self):
     util.log("This should have a timestamp")