当前位置: 首页>>代码示例>>Python>>正文


Python Transport.catches_version方法代码示例

本文整理汇总了Python中tambo.Transport.catches_version方法的典型用法代码示例。如果您正苦于以下问题:Python Transport.catches_version方法的具体用法?Python Transport.catches_version怎么用?Python Transport.catches_version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tambo.Transport的用法示例。


在下文中一共展示了Transport.catches_version方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from tambo import Transport [as 别名]
# 或者: from tambo.Transport import catches_version [as 别名]
    def main(self, argv):
        # Console Logger
        sh = logging.StreamHandler()
        sh.setFormatter(log.color_format())
        sh.setLevel(logging.DEBUG)

        root_logger = logging.getLogger()
        root_logger.setLevel(logging.DEBUG)
        root_logger.addHandler(sh)

        self.api_credentials()

        # TODO: Need to implement `--filename` and make it available
        options = [['--log', '--logging']]
        parser = Transport(argv, mapper=self.mapper,
                           options=options, check_help=False,
                           check_version=False)
        parser.parse_args()
        chacractl.config['verbosity'] = parser.get('--log', 'info')
        parser.catch_help = self.help()
        parser.catch_version = chacractl.__version__
        parser.mapper = self.mapper
        if len(argv) <= 1:
            return parser.print_help()
        parser.dispatch()
        parser.catches_help()
        parser.catches_version()
开发者ID:ceph,项目名称:chacractl,代码行数:29,代码来源:main.py

示例2: main

# 需要导入模块: from tambo import Transport [as 别名]
# 或者: from tambo.Transport import catches_version [as 别名]
 def main(self, argv):
     parser = Transport(argv, mapper=self.mapper,
                        options=[], check_help=False,
                        check_version=False)
     parser.parse_args()
     parser.catch_help = self.help(parser.subhelp())
     parser.catch_version = ceph_installer.__version__
     parser.mapper = self.mapper
     if len(argv) <= 1:
         return parser.print_help()
     parser.dispatch()
     parser.catches_help()
     parser.catches_version()
开发者ID:b-ranto,项目名称:ceph-installer,代码行数:15,代码来源:main.py

示例3: main

# 需要导入模块: from tambo import Transport [as 别名]
# 或者: from tambo.Transport import catches_version [as 别名]
 def main(self, argv):
     options = []
     parser = Transport(argv, mapper=self.mapper,
                        options=options, check_help=False,
                        check_version=False)
     parser.parse_args()
     parser.catch_help = self.help()
     parser.catch_version = rhcephpkg.__version__
     parser.mapper = self.mapper
     if len(argv) <= 1:
         return parser.print_help()
     parser.dispatch()
     parser.catches_help()
     parser.catches_version()
开发者ID:ktdreyer,项目名称:rhcephpkg,代码行数:16,代码来源:main.py

示例4: main

# 需要导入模块: from tambo import Transport [as 别名]
# 或者: from tambo.Transport import catches_version [as 别名]
 def main(self, argv):
     options = [['--log', '--logging']]
     parser = Transport(argv, mapper=self.mapper,
                        options=options, check_help=False,
                        check_version=False)
     parser.parse_args()
     merfi.config['verbosity'] = parser.get('--log', 'info')
     merfi.config['check'] = parser.has('--check')
     parser.catch_help = self.help()
     parser.catch_version = merfi.__version__
     parser.mapper = self.mapper
     if len(argv) <= 1:
         return parser.print_help()
     parser.dispatch()
     parser.catches_help()
     parser.catches_version()
开发者ID:alfredodeza,项目名称:merfi,代码行数:18,代码来源:main.py

示例5: main

# 需要导入模块: from tambo import Transport [as 别名]
# 或者: from tambo.Transport import catches_version [as 别名]
    def main(self, argv):
        parser = Transport(argv, mapper=self.mapper,
                           check_help=False,
                           check_version=False)
        parser.parse_args()
        parser.catch_help = self.help()
        parser.catch_version = wari.__version__
        parser.mapper = self.mapper
        if len(argv) <= 1:
            return parser.print_help()

        # create the connection and set the collection
        conn = wari.db.get_connection()
        wari.db.connection = conn
        wari.db.collection = conn['wari']

        parser.dispatch()
        parser.catches_help()
        parser.catches_version()
        conn.close()
开发者ID:alfredodeza,项目名称:wari,代码行数:22,代码来源:main.py


注:本文中的tambo.Transport.catches_version方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。