mfocko / centos / centpkg

Forked from centos/centpkg 7 months ago
Clone

0da767 use the centos_cert lib from python-centos

Authored and Committed by bstinson 9 years ago
    use the centos_cert lib from python-centos
    
        
file modified
+5 -3
src/centpkg/__init__.py CHANGED
@@ -18,10 +18,11 @@
18
18
19
19
import os
20
20
import re
21
+ import sys
21
22
import warnings
22
23
23
24
from pyrpkg import Commands, rpkgError
24
- from . import centos_cert
25
+ from centos import centos_cert
25
26
from . import cli
26
27
27
28
class DistGitDirectory(object):
@@ -152,8 +153,9 @@ class Commands(Commands):
152
153
153
154
def load_user(self):
154
155
try:
155
- self._user = centos_cert.read_user_cert()
156
- except Exception, e:
156
+ self._user = centos_cert.CentOSUserCert().CN
157
+ except:
158
+ print >>sys.stderr, "Could not load user from cert file"
157
159
super(Commands, self).load_user()
158
160
159
161
# These are the commands defined in the base pyrpkg.Commands class