Allow spaced fingerprint entries as well as multiple fingerprints.
[gentoo-keys.git] / bin / gkey-ldap
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 '''Gentoo-keys is a gpg key manager for managing
5  gentoo's gpg-signing keys.  It is these keys that are
6  used to verify and validate release media, etc..
7
8  Distributed under the terms of the GNU General Public License v2
9
10  Copyright:
11              (c) 2011 Brian Dolbec
12              Distributed under the terms of the GNU General Public License v2
13
14  Author(s):
15              Brian Dolbec <dolsen@gentoo.org>
16
17 '''
18
19 from __future__ import print_function
20
21 import os
22 import sys
23 # This block ensures that ^C interrupts are handled quietly.
24 try:
25     import signal
26
27     def exithandler(signum,frame):
28         signal.signal(signal.SIGINT, signal.SIG_IGN)
29         signal.signal(signal.SIGTERM, signal.SIG_IGN)
30         print()
31         sys.exit(1)
32
33     signal.signal(signal.SIGINT, exithandler)
34     signal.signal(signal.SIGTERM, exithandler)
35     signal.signal(signal.SIGPIPE, signal.SIG_DFL)
36
37 except KeyboardInterrupt:
38     print()
39     sys.exit(1)
40
41
42 from gkeyldap.cli import Main
43
44 root = None
45 try:
46     root = os.environ['ROOT']
47 except KeyError:
48     pass
49
50 main = Main(root=root)
51 main()