WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [ACM] Support for initial unicode handlin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [ACM] Support for initial unicode handling of strings in policies.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 06 Jul 2007 10:12:55 -0700
Delivery-date: Fri, 06 Jul 2007 10:11:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1183729431 -3600
# Node ID d49e6a814d9a4cc8b136b599b77557920abd7921
# Parent  05331a29f3cb1617746dbf0fbea1089a79111bac
[ACM] Support for initial unicode handling of strings in policies.
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 tools/security/xensec_ezpolicy |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff -r 05331a29f3cb -r d49e6a814d9a tools/security/xensec_ezpolicy
--- a/tools/security/xensec_ezpolicy    Fri Jul 06 14:42:55 2007 +0100
+++ b/tools/security/xensec_ezpolicy    Fri Jul 06 14:43:51 2007 +0100
@@ -1102,8 +1102,10 @@ def org2dict():
     for i in iterchildren(app.win.orgs.GetRootItem()):
         d = []
         for j in iterchildren(i):
-            d.append(str(app.win.orgspanel.orgs.GetItemText(j)))
-        o.append([str(app.win.orgspanel.orgs.GetItemText(i)) , d])
+            d.append(
+                  str(app.win.orgspanel.orgs.GetItemText(j).encode("utf-8")))
+        o.append([str(app.win.orgspanel.orgs.GetItemText(i).encode("utf-8")),
+                 d])
     dic['orgs'] = o
     c=[]
     for i in app.win.conspanel.conflictsets:
@@ -1175,12 +1177,14 @@ def printPolicy(fd, types, cons):
                 continue
             #name is optional but must be set
             if i[0]:
-                rer_name = str(i[0])
+                rer_name = i[0]
             else:
-                rer_name = str("RER")
-            fd.write("""            <Conflict name=\"%s\">\n""" % rer_name)
+                rer_name = "RER"
+            fd.write("""            <Conflict name=\"""" +
+                     rer_name.encode("utf-8") + """\">\n""")
             for j in i[1]:
-                fd.write("""                <Type>%s</Type>\n""" % str(j))
+                typ = j.encode("utf-8")
+                fd.write("""                <Type>%s</Type>\n""" % typ)
             fd.write("""            </Conflict>\n""")
         fd.write("""       </ConflictSets>\n""")
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [ACM] Support for initial unicode handling of strings in policies., Xen patchbot-unstable <=