backend/server/handlers/xmlrpc/errata.py | 15 ++++-----------
selinux/oracle-xe-selinux/oracle-xe-selinux.spec | 12 +++++++++---
2 files changed, 13 insertions(+), 14 deletions(-)
New commits:
commit d842a9c6c059421a5e3e6fd8b6e9e91fcfabe04d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Wed Nov 30 10:04:58 2011 +0100
system user uids are < 1000 on Fedora 16
diff --git a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
index 4f2594d..6c36cf7 100644
--- a/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
+++ b/selinux/oracle-xe-selinux/oracle-xe-selinux.spec
@@ -87,12 +87,18 @@ rm -rf %{buildroot}
%pre
+%if 0%{fedora} >= 16
+%define min_uid 1000
+%else
+%define min_uid 500
+%endif
+
ORACLE_UID=`id -u oracle`
if [ -z "$ORACLE_UID" ] ; then
- echo "The oracle user has to exist with uid < 500 before installing this
package."
+ echo "The oracle user has to exist with uid < %{min_uid} before installing
this package."
exit 1
-elif [ $ORACLE_UID -ge 500 ] ; then
- echo "The oracle user has to exist with uid < 500 before installing this
package."
+elif [ $ORACLE_UID -ge %{min_uid} ] ; then
+ echo "The oracle user has to exist with uid < %{min_uid} before installing
this package."
echo "User with uid [$ORACLE_UID] found which is not good."
exit 1
fi
commit 99101d276aa70c351d9c464b4d38844a385651bf
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Nov 29 11:20:19 2011 +0100
cleaned up duplicated code
diff --git a/backend/server/handlers/xmlrpc/errata.py
b/backend/server/handlers/xmlrpc/errata.py
index 49d172a..69c96a2 100644
--- a/backend/server/handlers/xmlrpc/errata.py
+++ b/backend/server/handlers/xmlrpc/errata.py
@@ -94,17 +94,7 @@ class Errata(rhnHandler):
and e.id = ce.errata_id
""")
h.execute(name = pkg[0], dist = str(osRel))
- ret = []
- # sanitize the results for display in the clients
- while 1:
- row = h.fetchone_dict()
- if row is None:
- break
- for k in row.keys():
- if row[k] is None:
- row[k] = "N/A"
- ret.append(row)
- return ret
+ return self._sanitize_result(h)
def getPackageErratum(self, system_id, pkg):
""" Clients v2+ - Get errata for a package given [n,v,r,e,a,...]
format
@@ -164,6 +154,9 @@ class Errata(rhnHandler):
""") # " emacs sucks
h.execute(name = name, ver = ver, rel = rel, epoch = epoch,
server_id = str(self.server_id))
+ return self._sanitize_result(h)
+
+ def _sanitize_result(self, h):
ret = []
# sanitize the results for display in the clients
while 1:
Show replies by date