From 4fefe83c3203c11fadbe43637a3058284b60427b Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Fri, 8 Sep 2017 10:44:23 -0500 Subject: Refactor to conform to YP Compat requirements Change the references to check for the distribution flag of 'selinux' being set before taking any action within the bbappends. This prevents the signature from being modified. Also remove PR changes, as they are no longer allowed. Signed-off-by: Mark Hatle --- recipes-devtools/python/files/sitecustomize.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 recipes-devtools/python/files/sitecustomize.py (limited to 'recipes-devtools/python/files/sitecustomize.py') diff --git a/recipes-devtools/python/files/sitecustomize.py b/recipes-devtools/python/files/sitecustomize.py new file mode 100644 index 0000000..d2b71fa --- /dev/null +++ b/recipes-devtools/python/files/sitecustomize.py @@ -0,0 +1,26 @@ +# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer +# GPLv2 or later +# Version: 20081123 +# Features: +# * set proper default encoding +# Features removed for SELinux: +# * enable readline completion in the interactive interpreter +# * load command line history on startup +# * save command line history on exit + +import os + +def __enableDefaultEncoding(): + import sys + try: + sys.setdefaultencoding( "utf8" ) + except LookupError: + pass + +import sys +try: + import rlcompleter, readline +except ImportError: + pass +else: + __enableDefaultEncoding() -- cgit v1.2.3-54-g00ecf