diff options
Diffstat (limited to 'hgsshsign/__init__.py')
-rw-r--r-- | hgsshsign/__init__.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/hgsshsign/__init__.py b/hgsshsign/__init__.py index a6991db..80c5d82 100644 --- a/hgsshsign/__init__.py +++ b/hgsshsign/__init__.py | |||
@@ -6,9 +6,8 @@ SSH Key Signing | |||
6 | @organization: American Greetings Interactive | 6 | @organization: American Greetings Interactive |
7 | @date: May 03, 2010 | 7 | @date: May 03, 2010 |
8 | """ | 8 | """ |
9 | |||
10 | |||
11 | import os | 9 | import os |
10 | import sys | ||
12 | import binascii | 11 | import binascii |
13 | 12 | ||
14 | from hgsshsign._meta import __version__ | 13 | from hgsshsign._meta import __version__ |
@@ -26,7 +25,14 @@ class SSHAuthority(object): | |||
26 | import hgsshsign.keys as keys | 25 | import hgsshsign.keys as keys |
27 | from hgsshsign.keymanifest import KeyManifest | 26 | from hgsshsign.keymanifest import KeyManifest |
28 | 27 | ||
29 | public_key = absolute_path(ui.config("sshsign", "public_key")) | 28 | try: |
29 | public_key = absolute_path(ui.config("sshsign", "public_key")) | ||
30 | |||
31 | except TypeError: | ||
32 | raise util.Abort( | ||
33 | _("You must define sshsign.public_key in your hgrc")), \ | ||
34 | None, sys.exc_info()[2] | ||
35 | |||
30 | public_key = keys.PublicKey.from_file(public_key) | 36 | public_key = keys.PublicKey.from_file(public_key) |
31 | 37 | ||
32 | manifest_file = ui.config("sshsign", "manifest_file") | 38 | manifest_file = ui.config("sshsign", "manifest_file") |