[Pkg-libvirt-commits] [SCM] Virtinst Debian packaging branch, master, updated. debian/0.600.3-3

Guido Günther agx at sigxcpu.org
Sat Jan 19 09:18:34 UTC 2013


The following commit has been merged in the master branch:
commit b5ec57ece10179cf03f0e94f91eee76e3b98ffe7
Author: Guido Günther <agx at sigxcpu.org>
Date:   Tue Jan 15 16:20:51 2013 +0100

    Don't fail if we can't set locale (debian bug #697864)
    
    Thanks: Cole Robinson
    Closes: #697864

diff --git a/debian/patches/0009-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch b/debian/patches/0009-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch
new file mode 100644
index 0000000..295a348
--- /dev/null
+++ b/debian/patches/0009-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch
@@ -0,0 +1,27 @@
+From: Cole Robinson <crobinso at redhat.com>
+Date: Mon, 14 Jan 2013 15:06:14 -0500
+Subject: Don't fail if we can't set locale (debian bug #697864)
+
+---
+ virtinst/cli.py |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/virtinst/cli.py b/virtinst/cli.py
+index e0d8f21..0687b60 100644
+--- a/virtinst/cli.py
++++ b/virtinst/cli.py
+@@ -144,7 +144,13 @@ def setupParser(usage=None):
+     return parser
+ 
+ def setupGettext():
+-    locale.setlocale(locale.LC_ALL, '')
++    try:
++        locale.setlocale(locale.LC_ALL, '')
++    except locale.Error, e:
++        print >> sys.stderr, "warning: failed to set locale, defaulting to C"
++        os.environ['LC_ALL'] = 'C'
++        locale.setlocale(locale.LC_ALL, 'C')
++
+     gettext.bindtextdomain("virtinst")
+     gettext.install("virtinst")
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e15b2c4..e722955 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
 0006-virt-install-avoid-disk-name-collisions.patch
 0007-Don-t-fail-if-no-meter-is-used.patch
 0008-The-Debian-stable-release-always-exists.patch
+0009-Don-t-fail-if-we-can-t-set-locale-debian-bug-697864.patch

-- 
Virtinst Debian packaging



More information about the Pkg-libvirt-commits mailing list