Accepting request 201623 from security:apparmor
- update apparmor-init.py-gsoc.diff to the final GSoC apparmor/__init__.py Please also include this change in 13.1 OBS-URL: https://build.opensuse.org/request/show/201623 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apparmor?expand=0&rev=54
This commit is contained in:
commit
a4cced906b
@ -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 <kgupta8592@gmail.com>
|
||||
#
|
||||
# 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()
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user