(self, *args)
Attach seqs(s) to local node.
Attach seqs(s) to local node.
Attach seqs ( s ) to local node .
def cmd_add_seq(self, *args):
        """Attach seqs(s) to local node."""
        dst_db = self.get_database('db')
        dst_curs = dst_db.cursor()
        src_db = self.get_provider_db()
        src_curs = src_db.cursor()

        src_seqs = self.fetch_seqs(src_curs)
        dst_seqs = self.fetch_seqs(dst_curs)
        src_db.commit()
        self.sync_seq_list(dst_curs, src_seqs, dst_seqs)
        dst_db.commit()

        args = self.expand_arg_list(dst_db, 'S', False, args)

        # pick proper create flags
        if self.options.create_full:
            create_flags = skytools.T_SEQUENCE
        elif self.options.create:
            create_flags = skytools.T_SEQUENCE
        else:
            create_flags = 0

        # seems ok
        for seq in args:
            seq = skytools.fq_name(seq)
            self.add_seq(src_db, dst_db, seq, create_flags)
        dst_db.commit()
def cmd_add_seq ( self , * args ) : dst_db = self . get_database ( 'db' ) dst_curs = dst_db . cursor ( ) src_db = self . get_provider_db ( ) src_curs = src_db . cursor ( ) src_seqs = self . fetch_seqs ( src_curs ) dst_seqs = self . fetch_seqs ( dst_curs ) src_db . commit ( ) self . sync_seq_list ( dst_curs , src_seqs , dst_seqs ) dst_db . commit ( ) args = self . expand_arg_list ( dst_db , 'S' , False , args ) # pick proper create flags if self . options . create_full : create_flags = skytools . T_SEQUENCE elif self . options . create : create_flags = skytools . T_SEQUENCE else : create_flags = 0 # seems ok for seq in args : seq = skytools . fq_name ( seq ) self . add_seq ( src_db , dst_db , seq , create_flags ) dst_db . commit ( )