rpms/smolt/EL-5 0001-Client-Hopefully-fix-encoding-trouble.patch, NONE, 1.1 smolt.spec, 1.41, 1.42
Mike McGrath
mmcgrath at fedoraproject.org
Tue Oct 13 19:25:13 UTC 2009
Author: mmcgrath
Update of /cvs/pkgs/rpms/smolt/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13107
Modified Files:
smolt.spec
Added Files:
0001-Client-Hopefully-fix-encoding-trouble.patch
Log Message:
Adding patch that is requried for build
0001-Client-Hopefully-fix-encoding-trouble.patch:
sendProfile.py | 9 +++++----
smolt.py | 12 +++++++++++-
2 files changed, 16 insertions(+), 5 deletions(-)
--- NEW FILE 0001-Client-Hopefully-fix-encoding-trouble.patch ---
>From 7243f1fcc395cdf87815ac5a33c0d2f8b61c0cdf Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian at pipping.org>
Date: Sun, 20 Sep 2009 21:38:35 +0200
Subject: [PATCH 1/2] Client: Hopefully fix encoding trouble
More or less a squashed cherry-pick from these commits:
- 7592c44f6eef240aaae147ba11ffe85a4156068b
- 81bfa3f0f5172d853f95034e061c4e3a4bd55ebe
- b21ddc39c1e51329a957a463aff3b7db09f5a726
- fa41853f7fcbe5e465bbd25fbe94942a87a5d2bb
---
client/sendProfile.py | 9 +++++----
client/smolt.py | 11 +++++++++++
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/client/sendProfile.py b/client/sendProfile.py
index 46b0f18..ff3a0a9 100644
--- a/client/sendProfile.py
+++ b/client/sendProfile.py
@@ -36,6 +36,7 @@ import smolt
from smolt import debug
from smolt import error
from smolt import get_config_attr
+from smolt import to_ascii
from scan import scan, rating
from gate import GateFromConfig
@@ -179,10 +180,10 @@ if not opts.autoSend:
'label_fs_related':_('File system-related'),
'label_distro_specific':_('Distribution-specific'),
- 'general':inner_indent(profile.get_general_info_excerpt()),
- 'devices':inner_indent(profile.get_devices_info_excerpt()),
- 'file_system':inner_indent(profile.get_file_system_info_excerpt()),
- 'distro':inner_indent(profile.get_distro_info_excerpt()),
+ 'general':inner_indent(to_ascii(profile.get_general_info_excerpt())),
+ 'devices':inner_indent(to_ascii(profile.get_devices_info_excerpt())),
+ 'file_system':inner_indent(to_ascii(profile.get_file_system_info_excerpt())),
+ 'distro':inner_indent(to_ascii(profile.get_distro_info_excerpt())),
}
submit = False
diff --git a/client/smolt.py b/client/smolt.py
index dee142f..7016ab6 100644
--- a/client/smolt.py
+++ b/client/smolt.py
@@ -51,6 +51,7 @@ from fs_util import get_fslist
from gate import Gate
from uuiddb import UuidDb
+import codecs
WITHHELD_MAGIC_STRING = 'WITHHELD'
SELINUX_ENABLED = 1
@@ -140,6 +141,16 @@ PCI_CLASS_SERIAL_USB = 3
PCI_CLASS_SERIAL_FIBER = 4
PCI_CLASS_SERIAL_SMBUS = 5
+def to_ascii(o, current_encoding='utf-8'):
+ if not isinstance(o, basestring):
+ return o
+
+ if isinstance(o, unicode):
+ s = o
+ else:
+ s = unicode(o, current_encoding)
+ return codecs.encode(s, 'ascii', 'ignore')
+
class Device:
def __init__(self, props, hardware):
self.UUID = getUUID()
--
1.6.2.5
Index: smolt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/smolt/EL-5/smolt.spec,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -p -r1.41 -r1.42
--- smolt.spec 13 Oct 2009 18:53:30 -0000 1.41
+++ smolt.spec 13 Oct 2009 19:25:12 -0000 1.42
@@ -2,7 +2,7 @@ Name: smolt
Summary: Fedora hardware profiler
Version: 1.4
-Release: 2.2%{?dist}
+Release: 2.3%{?dist}
License: GPLv2+
Group: Applications/Internet
URL: http://fedorahosted.org/smolt
@@ -210,7 +210,7 @@ done
#%{_bindir}/smoltGui
%changelog
-* Mon Oct 13 2009 Mike McGrath <mmcgrath at redhat.com> 1.4-2.2
+* Mon Oct 13 2009 Mike McGrath <mmcgrath at redhat.com> 1.4-2.3
- Release bump
* Wed Sep 23 2009 Mike McGrath <mmcgrath at redhat.com> 1.4-2.1
More information about the fedora-extras-commits
mailing list