[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Make python-pam warning only appear if using XenAPI
# HG changeset patch # User Alastair Tse <atse@xxxxxxxxxxxxx> # Date 1170248321 0 # Node ID 7c992fd3b19ba3f7094e0c01205a481dc74661f8 # Parent 54678a99e1020c3f761416674e43626f4a553778 [XEND] Make python-pam warning only appear if using XenAPI Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx> --- tools/python/xen/xend/XendAuthSessions.py | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff -r 54678a99e102 -r 7c992fd3b19b tools/python/xen/xend/XendAuthSessions.py --- a/tools/python/xen/xend/XendAuthSessions.py Wed Jan 31 12:23:35 2007 +0000 +++ b/tools/python/xen/xend/XendAuthSessions.py Wed Jan 31 12:58:41 2007 +0000 @@ -20,11 +20,6 @@ from xen.xend import uuid from xen.xend import uuid from xen.xend.XendError import * from xen.xend.XendLogging import log - -try: - import PAM -except ImportError: - log.warn("python-pam is required for XenAPI support.") class XendAuthSessions: """Keeps track of Xen API Login Sessions using PAM. @@ -80,7 +75,11 @@ class XendAuthSessions: """ pam_auth = None try: + import PAM pam_auth = PAM.pam() + except ImportError: + log.warn("python-pam is required for XenAPI support.") + return False except NameError: # if PAM doesn't exist, let's ignore it return False _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |