Ignore:
Timestamp:
Sep 17, 2012, 2:08:56 AM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
49724e4
Parents:
ac9b167
git-author:
Alex Dehnert <adehnert@…> (09/17/12 02:08:56)
git-committer:
Alex Dehnert <adehnert@…> (09/17/12 02:08:56)
Message:

kinit when creating a MoiraList? object

This allows group/diffs.py to work without kinit'ing outside the script, fixing
the key deficiency in ac9b167bcf85a9f723e27967649c2c033f2259da.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/util/mailinglist.py

    rac9b167 rb42118c  
    11import subprocess
     2
     3import mit
    24
    35
     
    1517BLANCHE_PATH="/usr/bin/blanche"
    1618class MoiraList(MailingList):
     19    def __init__(self, *args, **kwargs):
     20        super(MoiraList, self).__init__(*args, **kwargs)
     21        self.ccache = mit.kinit()
     22
    1723    def list_members(self, ):
    1824        raise NotImplementedError
     
    5561        # changes, and use -al / -dl with a tempfile as appropriate.
    5662
     63        env = dict(KRB5CCNAME=self.ccache.name)
    5764        cmdline = [BLANCHE_PATH, self.name, ]
    5865
     
    7279            stdout=subprocess.PIPE,
    7380            stderr=subprocess.STDOUT,
     81            env=env,
    7482        )
    7583        stdout, stderr = res.communicate()
Note: See TracChangeset for help on using the changeset viewer.