diff --git a/apparmor-init.py-gsoc.diff b/apparmor-init.py-gsoc.diff index b1144e3..44ea4e9 100644 --- a/apparmor-init.py-gsoc.diff +++ b/apparmor-init.py-gsoc.diff @@ -4,8 +4,6 @@ least in the 2.8 branch). If we do this, we can ship his new tools in a testing package that can be installed on top of the 2.8.x packages without problems -This patch slightly differs from Kshitij's code to avoid problems with -explicit LANG=C === modified file 'utils/apparmor/__init__.py' --- utils/apparmor/__init__.py 2012-05-08 05:37:48 +0000 @@ -14,7 +12,7 @@ explicit LANG=C # ------------------------------------------------------------------ # # Copyright (C) 2011-2012 Canonical Ltd. -+# Copyright (C) 2013 Kshitij Gupta ++# Copyright (C) 2013 Kshitij Gupta # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public @@ -27,13 +25,13 @@ explicit LANG=C + +def init_localisation(): + locale.setlocale(locale.LC_ALL, '') -+ #cur_locale = locale.getlocale() ++ #If a correct locale has been provided set filename else let an IOError be raised ++ filename = '/usr/share/locale/%s/LC_MESSAGES/apparmor-utils.mo' % locale.getlocale()[0] + try: -+ filename = '/usr/share/locale/%s/LC_MESSAGES/apparmor-utils.mo' % locale.getlocale()[0][0:2] -+ trans = gettext.GNUTranslations(open( filename, 'rb')) -+ except: # IOError: ++ trans = gettext.GNUTranslations(open(filename, 'rb')) ++ except IOError: + trans = gettext.NullTranslations() + trans.install() -+ ++ +init_localisation() diff --git a/apparmor.changes b/apparmor.changes index 12462f4..8cc83c3 100644 --- a/apparmor.changes +++ b/apparmor.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Sep 29 15:00:20 UTC 2013 - opensuse@cboltz.de + +- update apparmor-init.py-gsoc.diff to the final GSoC apparmor/__init__.py + ------------------------------------------------------------------- Fri Sep 20 11:28:20 UTC 2013 - opensuse@cboltz.de