blob: 7eac1445ac45a8e828c1e4bd239c1ab8378125c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#
#-*- coding:utf-8 -*-
"""
Gentoo-keys - gkeys-gpg/actions.py
Primary api interface module
@copyright: 2012 by Brian Dolbec <dol-sen@gentoo.org>
@license: GNU GPL2, see COPYING for details.
"""
from __future__ import print_function
import os
import sys
if sys.version_info[0] >= 3:
py_input = input
_unicode = str
else:
py_input = raw_input
_unicode = unicode
from collections import defaultdict
from snakeoil.demandload import demandload
from gkeys.gkey import GKEY
from gkeys.checks import SPECCHECK_SUMMARY, convert_pf, convert_yn
demandload(
"json:load",
"gkeys.lib:GkeysGPG",
"gkeys.seedhandler:SeedHandler",
)
EXTENSIONS = ['.sig', '.asc', '.gpg','.gpgsig']
class Actions(object):
'''Primary API actions'''
def __init__(self, config, output=None, logger=None):
self.config = config
self.output = output
self.logger = logger
self.seeds = None
|