sequence.py 文件源码

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

项目:alfred-ec2 作者: SoMuchToGrok 项目源码 文件源码
def _connect(self):
        """Connect to our domain"""
        if not self._db:
            import boto
            sdb = boto.connect_sdb()
            if not self.domain_name:
                self.domain_name = boto.config.get("DB", "sequence_db", boto.config.get("DB", "db_name", "default"))
            try:
                self._db = sdb.get_domain(self.domain_name)
            except SDBResponseError as e:
                if e.status == 400:
                    self._db = sdb.create_domain(self.domain_name)
                else:
                    raise
        return self._db
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号