From 56b01b6eaa4490403a64d56b828e340e1a97600a Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Thu, 13 Feb 2014 11:14:34 -0800 Subject: [PATCH] utils/apparmor/yasti.py: work around ycp not being available everywhere --- utils/apparmor/yasti.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/apparmor/yasti.py b/utils/apparmor/yasti.py index e54930811..5b7b2a351 100644 --- a/utils/apparmor/yasti.py +++ b/utils/apparmor/yasti.py @@ -12,8 +12,12 @@ # # ---------------------------------------------------------------------- import re -import ycp import sys +try: + import ycp +except ImportError: + # ycp isn't found everywhere. + ycp = None from apparmor.common import error, DebugLogger