@glacier_connect
    @sns_connect
    def sns_subscribe(self, protocol, endpoint, topic, sns_options, vault_names=None):
        all_topics = self.sns_conn.get_all_topics()['ListTopicsResponse']['ListTopicsResult']['Topics']

        topic_arn = self.sns_conn.create_topic(topic)['CreateTopicResponse']['CreateTopicResult']['TopicArn']


        if vault_names:
            vaults = vault_names.split(",")
            self._init_events_for_vaults(vaults, topic_arn)
        
        topic_arns = [topic_arn]

        if len(topic_arns):
            try:
                results = []
                for arn in topic_arns:
                    result = self.sns_conn.subscribe(arn, protocol, endpoint)['SubscribeResponse']
                    results += [{'SubscribeResult': result['SubscribeResult']['SubscriptionArn'],
                                'RequestId': result['ResponseMetadata']['RequestId']}]
                return results
            except boto.exception.BotoServerError as e:
                raise ResponseException(vault_name % "Failed to subscribe to notifications for vault %s.",
                    cause=self._decode_error_message(e.body),
                    code=e.code)
        else:
            raise Exception("No vaults matching that name found.")
dataset/ETHPy150Open uskudnik/amazon-glacier-cmd-interface/glacier/GlacierWrapper.py/GlacierWrapper.sns_subscribe/swapped operands of `%`