7 commits - backend/satellite_tools backend/server
by Jan Pazdziora
backend/satellite_tools/exporter/exportLib.py | 8 --------
backend/satellite_tools/rhn_satellite_activate.py | 6 ------
backend/server/configFilesHandler.py | 3 ---
backend/server/rhnChannel.py | 3 ---
backend/server/rhnDependency.py | 12 ------------
backend/server/rhnServer/satellite_cert.py | 3 ---
6 files changed, 35 deletions(-)
New commits:
commit 1a2eb32d8f1296845c86fce71cbefff0492b7cf8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:42:42 2010 +0200
Class UpdateSlots unused, removing.
diff --git a/backend/server/rhnServer/satellite_cert.py b/backend/server/rhnServer/satellite_cert.py
index c3c660a..551a4c9 100644
--- a/backend/server/rhnServer/satellite_cert.py
+++ b/backend/server/rhnServer/satellite_cert.py
@@ -73,9 +73,6 @@ class Slots:
rhn_entitlements.modify_org_service"""
return self._slot_name
-class UpdateSlots(Slots):
- _db_label = 'sw_mgr_entitled'
-
class ManagementSlots(Slots):
_db_label = 'enterprise_entitled'
_slot_name = 'enterprise'
commit 3e8b14be67f465f20dd0a9ccd3f5ce137d777821
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:30:15 2010 +0200
Exception SatCertNoFreeEntitlementsException not used, removing.
diff --git a/backend/satellite_tools/rhn_satellite_activate.py b/backend/satellite_tools/rhn_satellite_activate.py
index f00fc7a..00686f4 100644
--- a/backend/satellite_tools/rhn_satellite_activate.py
+++ b/backend/satellite_tools/rhn_satellite_activate.py
@@ -54,9 +54,6 @@ DEFAULT_CONFIG_FILE = "/etc/rhn/rhn.conf"
class CaCertInsertionError(Exception):
"raise when fail to insert CA cert into the local database"
-class SatCertNoFreeEntitlementsException(Exception):
- "Raise when no free entitlements are available during activation"
-
def openGzippedFile(filename):
""" Open a file for reading. File may or may not be a gzipped file.
Returns a file object.
commit de417954106c109e48d46afbd97699f0543ed00d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:28:20 2010 +0200
Classes _KickstartTreeTypeDumper and _KickstartInstalTypeDumper do not seem to be used, removing.
diff --git a/backend/satellite_tools/exporter/exportLib.py b/backend/satellite_tools/exporter/exportLib.py
index 93640b7..72d045e 100644
--- a/backend/satellite_tools/exporter/exportLib.py
+++ b/backend/satellite_tools/exporter/exportLib.py
@@ -1473,14 +1473,6 @@ class _KickstartFileEntryDumper(BaseRowDumper):
data_iterator=ArrayIterator(checksum_arr))]
return ArrayIterator(arr)
-class _KickstartTreeTypeDumper(BaseDumper):
- tag_name = 'rhn-kickstart-tree-type'
- # STUB
-
-class _KickstartInstalTypeDumper(BaseDumper):
- tag_name = 'rhn-kickstart-install-type'
- # STUB
-
def _dbtime2timestamp(val):
return int(rhnLib.timestamp(val))
commit 141ad56e77aca6c58b2b6b4ecaead3eb59552940
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:25:28 2010 +0200
Exceptions IncompleteLimitInfo and IncompleteLimitInfo* not used, removing.
diff --git a/backend/server/rhnDependency.py b/backend/server/rhnDependency.py
index f8f773e..84095ea 100644
--- a/backend/server/rhnDependency.py
+++ b/backend/server/rhnDependency.py
@@ -284,18 +284,6 @@ class SolveDependenciesError(Exception):
self.deps = deps
self.packages = packages
-class InvalidLimitField(SolveDependenciesError):
- pass
-
-class InvalidLimitOperator(SolveDependenciesError):
- pass
-
-class InvalidLimit(SolveDependenciesError):
- pass
-
-class IncompleteLimitInfo(SolveDependenciesError):
- pass
-
class MakeEvrError(SolveDependenciesError):
pass
commit bd18bfdc279756f7fcd84fe28e832eea4376fd22
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:24:44 2010 +0200
Exception genServerCertError not used, removing.
diff --git a/backend/satellite_tools/rhn_satellite_activate.py b/backend/satellite_tools/rhn_satellite_activate.py
index b17cdd4..f00fc7a 100644
--- a/backend/satellite_tools/rhn_satellite_activate.py
+++ b/backend/satellite_tools/rhn_satellite_activate.py
@@ -54,9 +54,6 @@ DEFAULT_CONFIG_FILE = "/etc/rhn/rhn.conf"
class CaCertInsertionError(Exception):
"raise when fail to insert CA cert into the local database"
-class genServerCertError(Exception):
- "Raise when we fail to properly generate a httpd server certificate"
-
class SatCertNoFreeEntitlementsException(Exception):
"Raise when no free entitlements are available during activation"
commit 6881589fd0156512fd1f472d04db9bbd3fc16b41
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:24:01 2010 +0200
Exception ForceNotSpecified not used, removing.
diff --git a/backend/server/rhnChannel.py b/backend/server/rhnChannel.py
index 0357fd9..706e204 100644
--- a/backend/server/rhnChannel.py
+++ b/backend/server/rhnChannel.py
@@ -60,9 +60,6 @@ class InvalidEntryError(Exception):
class InvalidDataError(Exception):
pass
-class ForceNotSpecified(Exception):
- pass
-
class ChannelNotFoundError(Exception):
pass
commit 04fa4eccf8c606f34a2a6c143291f84b8d1e6e18
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:12:13 2010 +0200
Class ConfigFileMissingStatInfo not used, removing.
diff --git a/backend/server/configFilesHandler.py b/backend/server/configFilesHandler.py
index 03d4679..ad6ba14 100644
--- a/backend/server/configFilesHandler.py
+++ b/backend/server/configFilesHandler.py
@@ -55,9 +55,6 @@ class ConfigFileMissingInfoError(ConfigFileError):
class ConfigFileMissingContentError(ConfigFileError):
pass
-class ConfigFileMissingStatInfo(ConfigFileError):
- pass
-
class ConfigFileTooLargeError(ConfigFileError):
pass
13 years, 6 months
3 commits - backend/common backend/satellite_tools backend/server backend/spacewalk-backend.spec
by Jan Pazdziora
backend/common/Makefile | 1
backend/common/rhn_timer.py | 73 --------------------------
backend/satellite_tools/exporter/exportLib.py | 16 -----
backend/server/importlib/importLib.py | 11 ---
backend/spacewalk-backend.spec | 1
5 files changed, 102 deletions(-)
New commits:
commit 9ecce8ad11a5c75bf14fc622296daed7287d2a4f
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:39:25 2010 +0200
The rhn_timer.py does not seem to be used anywhere, removing.
diff --git a/backend/common/Makefile b/backend/common/Makefile
index c85e03b..ee3726e 100644
--- a/backend/common/Makefile
+++ b/backend/common/Makefile
@@ -11,7 +11,6 @@ SPACEWALK_FILES = __init__ \
apache \
byterange \
rhn_posix \
- rhn_timer \
rhnApache \
rhnCache \
rhnConfig \
diff --git a/backend/common/rhn_timer.py b/backend/common/rhn_timer.py
deleted file mode 100644
index a49ad29..0000000
--- a/backend/common/rhn_timer.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# Copyright (c) 2008 Red Hat, Inc.
-#
-# This software is licensed to you under the GNU General Public License,
-# version 2 (GPLv2). There is NO WARRANTY for this software, express or
-# implied, including the implied warranties of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
-# along with this software; if not, see
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-#
-# Red Hat trademarks are not licensed under GPLv2. No permission is
-# granted to use or replicate Red Hat trademarks that are incorporated
-# in this software or its documentation.
-#
-#
-
-import time
-
-class TimerException(Exception):
- pass
-
-class MissingCheckpointException(Exception):
- pass
-
-class Timer:
- def __init__(self):
- self._start = None
- self._checkpoint = None
- self._laps = {}
-
- def start(self):
- self._start = time.time()
- self._checkpoint = self._start
- return self
-
- def start_lap(self, name):
- self._laps[name] = time.time()
- return self
-
- def checkpoint(self, name=None, raw=0):
- now = time.time()
- if name is None:
- if self._checkpoint is None:
- raise MissingCheckpointException
- elapsed = now - self._checkpoint
- self._checkpoint = now
- else:
- if not self._laps.has_key(name):
- raise MissingCheckpointException(name)
- t = self._laps[name]
- if t is None:
- raise MissingCheckpointException(name)
- elapsed = now - t
- self._laps[name] = now
-
- if raw:
- return elapsed
- return self.format(elapsed)
-
- def elapsed(self, raw=0):
- e = time.time() - self._start
- if raw:
- return e
- return self.format(e)
-
- def format(self, val):
- return "%.3f" % val
-
- def end_lap(self, name, raw=0):
- ret = self.checkpoint(raw=raw, name=name)
- del self._laps[name]
- return self
-
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 0f19fcf..ba883df 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -332,7 +332,6 @@ rm -f %{rhnconf}/rhnSecret.py*
%{pythonrhnroot}/common/apache.py*
%{pythonrhnroot}/common/byterange.py*
%{pythonrhnroot}/common/rhn_posix.py*
-%{pythonrhnroot}/common/rhn_timer.py*
%{pythonrhnroot}/common/rhnApache.py*
%{pythonrhnroot}/common/rhnCache.py*
%{pythonrhnroot}/common/rhnConfig.py*
commit 8a60b4deae5af7f2d939918f161a6cebc88ffcb0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:35:50 2010 +0200
Class SourcePackageFile does not seem to be invoked, removing.
diff --git a/backend/server/importlib/importLib.py b/backend/server/importlib/importLib.py
index bc9ca95..94b97b9 100644
--- a/backend/server/importlib/importLib.py
+++ b/backend/server/importlib/importLib.py
@@ -395,17 +395,6 @@ class SourcePackage(IncompletePackage):
return self.source_rpm
-class SourcePackageFile(Information):
- attributeTypes = {
- 'file_size' : IntType,
- 'path' : StringType,
- 'org_id' : IntType,
- # these attributes are mutualy exclusive
- 'md5sum' : StringType, # xml dumps < 3.5
- 'checksum_list' : [Checksum],
- }
-
-
class Bug(Information):
attributeTypes = {
'bug_id' : StringType,
commit a9da2d4a813717c8f84ebda8dea56e5301e78e04
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:30:58 2010 +0200
Class ServerGroupTypeDumper not used anywhere, removing.
diff --git a/backend/satellite_tools/exporter/exportLib.py b/backend/satellite_tools/exporter/exportLib.py
index 4161f8b..93640b7 100644
--- a/backend/satellite_tools/exporter/exportLib.py
+++ b/backend/satellite_tools/exporter/exportLib.py
@@ -1323,22 +1323,6 @@ class ChannelPackageArchCompatDumper(RestrictedArchCompatDumper):
""")
-class ServerGroupTypeDumper(BaseDumper):
- tag_name = 'rhn-server-group-types'
-
- _query_set_iterator = rhnSQL.Statement("""
- select label, name
- from rhnServerGroupType
- """)
- def set_iterator(self):
- h = rhnSQL.prepare(self._query_set_iterator)
- h.execute()
- return h
-
- def dump_subelement(self, data):
- EmptyDumper(self._writer, 'rhn-server-group-type', data).dump()
-
-
class ServerGroupTypeServerArchCompatDumper(RestrictedArchCompatDumper):
tag_name = 'rhn-server-group-server-arch-compatibility-map'
_subelement_tag = 'rhn-server-group-server-arch-compat'
13 years, 6 months
Changes to 'refs/tags/spacewalk-java-1.2.75-1'
by Shannon Hughes
Tag 'spacewalk-java-1.2.75-1' created by Shannon Hughes <shughes(a)redhat.com> at 2010-10-27 14:46 +0000
Tagging package [spacewalk-java] version [1.2.75-1] in directory [java/].
Changes since spacewalk-backend-1.2.42-1:
Shannon Hughes (2):
fix for checkstyle
Automatic commit of package [spacewalk-java] release [1.2.75-1].
---
java/code/src/com/redhat/rhn/manager/kickstart/KickstartUrlHelper.java | 1 +
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
---
13 years, 6 months
java/spacewalk-java.spec rel-eng/packages
by Shannon Hughes
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 1d9434135f40624284aef990eb8dd40c24c41e9a
Author: Shannon Hughes <shughes(a)redhat.com>
Date: Wed Oct 27 10:46:29 2010 -0400
Automatic commit of package [spacewalk-java] release [1.2.75-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 71e430b..3a7fec7 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -19,7 +19,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.2.74
+Version: 1.2.75
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -358,6 +358,9 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Wed Oct 27 2010 Shannon Hughes <shughes(a)redhat.com> 1.2.75-1
+- fix for checkstyle (shughes(a)redhat.com)
+
* Wed Oct 27 2010 Lukas Zapletal 1.2.74-1
- Fixing missing brace in Taskomatic query
- Addressing issue in system overview
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 83cffa5..de31ef9 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.2.74-1 java/
+1.2.75-1 java/
13 years, 6 months
java/code
by Shannon Hughes
java/code/src/com/redhat/rhn/manager/kickstart/KickstartUrlHelper.java | 1 +
1 file changed, 1 insertion(+)
New commits:
commit f4ed707d0800fee492b65f012dfb2a7a667dd46b
Author: Shannon Hughes <shughes(a)redhat.com>
Date: Wed Oct 27 10:45:36 2010 -0400
fix for checkstyle
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartUrlHelper.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartUrlHelper.java
index 5762ec1..c5dd4e9 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartUrlHelper.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartUrlHelper.java
@@ -278,6 +278,7 @@ public class KickstartUrlHelper {
* /ty/xZ38
*
* @param session to compute tracking URL for.
+ * @param date for tiny url track
*
* @return String url to this KickstartData's media (packages, kernel
* etc...)
13 years, 6 months
Changes to 'refs/tags/spacewalk-backend-1.2.42-1'
by Lukas Zapletal
Tag 'spacewalk-backend-1.2.42-1' created by Lukas Zapletal <lzap+git(a)redhat.com> at 2010-10-27 14:27 +0000
Tagging package [spacewalk-backend] version [1.2.42-1] in directory [backend/].
Changes since spacewalk-backend-1.2.41-1:
Lukas Zapletal (2):
Fixing c89830b90cb36bd6a79641553c5091c57af8fb8e typo
Automatic commit of package [spacewalk-backend] release [1.2.42-1].
---
backend/server/rhnSQL/sql_row.py | 2 +-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
---
13 years, 6 months
2 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
by Lukas Zapletal
backend/server/rhnSQL/sql_row.py | 2 +-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 1ba9779dcf724a581c4bb4dacf246a4dbd12e59e
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Wed Oct 27 16:27:42 2010 +0200
Automatic commit of package [spacewalk-backend] release [1.2.42-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index c5f1ad4..0f19fcf 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -11,7 +11,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2 and Python
-Version: 1.2.41
+Version: 1.2.42
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -670,6 +670,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Oct 27 2010 Lukas Zapletal 1.2.42-1
+- Fixing c89830b90cb36bd6a79641553c5091c57af8fb8e typo
+
* Wed Oct 27 2010 Lukas Zapletal 1.2.41-1
- Fixing typo in driver_postgresql.py
- Class ReleaseChannelMapImport does not seem to be called, removing.
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 59a0030..388e462 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.2.41-1 backend/
+1.2.42-1 backend/
commit 1efb3f9b78ec01c2a6d1f9523e2243112306329f
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Wed Oct 27 16:27:32 2010 +0200
Fixing c89830b90cb36bd6a79641553c5091c57af8fb8e typo
diff --git a/backend/server/rhnSQL/sql_row.py b/backend/server/rhnSQL/sql_row.py
index 7edcff2..c10788c 100644
--- a/backend/server/rhnSQL/sql_row.py
+++ b/backend/server/rhnSQL/sql_row.py
@@ -94,7 +94,7 @@ class Row(UserDictCase):
# load an entry
def load(self, hashval):
- return load_sql(self, "%s = :hashval" % self.hashname, {'hashval': hashval})
+ return self.load_sql("%s = :hashval" % self.hashname, {'hashval': hashval})
# load from a sql clause
def load_sql(self, sql, pdict = {}):
13 years, 6 months
Changes to 'refs/tags/spacewalk-backend-1.2.41-1'
by Lukas Zapletal
Tag 'spacewalk-backend-1.2.41-1' created by Lukas Zapletal <lzap+git(a)redhat.com> at 2010-10-27 14:19 +0000
Tagging package [spacewalk-backend] version [1.2.41-1] in directory [backend/].
Changes since spacewalk-schema-1.2.56-1:
Jan Pazdziora (1):
Class ReleaseChannelMapImport does not seem to be called, removing.
Lukas Zapletal (2):
Fixing typo in driver_postgresql.py
Automatic commit of package [spacewalk-backend] release [1.2.41-1].
Michael Mraka (4):
XXX: not used currently; removing
reused load_sql() for load()
removed redundant empty tagMaps
fixed NameError: name 'SourcePackageImport' is not defined
---
backend/satellite_tools/diskImportLib.py | 2
backend/satellite_tools/xmlSource.py | 3
backend/server/importlib/channelImport.py | 42 ----------
backend/server/rhnPackage.py | 112 -----------------------------
backend/server/rhnSQL/driver_postgresql.py | 6 -
backend/server/rhnSQL/sql_row.py | 14 ---
backend/spacewalk-backend.spec | 10 ++
rel-eng/packages/spacewalk-backend | 2
8 files changed, 15 insertions(+), 176 deletions(-)
---
13 years, 6 months
2 commits - backend/server backend/spacewalk-backend.spec rel-eng/packages
by Lukas Zapletal
backend/server/rhnSQL/driver_postgresql.py | 6 ++----
backend/spacewalk-backend.spec | 10 +++++++++-
rel-eng/packages/spacewalk-backend | 2 +-
3 files changed, 12 insertions(+), 6 deletions(-)
New commits:
commit 9c905a36ea783ee0a1291d08e0d62c4faca1d1c5
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Wed Oct 27 16:19:34 2010 +0200
Automatic commit of package [spacewalk-backend] release [1.2.41-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 56c9dfb..c5f1ad4 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -11,7 +11,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2 and Python
-Version: 1.2.40
+Version: 1.2.41
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -670,6 +670,14 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Oct 27 2010 Lukas Zapletal 1.2.41-1
+- Fixing typo in driver_postgresql.py
+- Class ReleaseChannelMapImport does not seem to be called, removing.
+- fixed NameError: name 'SourcePackageImport' is not defined
+- removed redundant empty tagMaps
+- reused load_sql
+- XXX: not used currently; removing
+
* Wed Oct 27 2010 Lukas Zapletal 1.2.40-1
- In PostgreSQL NUMERIC types are returned as int or float now
- Rewritten DECODE to ANSI CASE-WHEN syntax for yum
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index f70e4bc..59a0030 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.2.40-1 backend/
+1.2.41-1 backend/
commit ab0bbb0a1e78d9c8d85d54bd18081b20dc2e75d0
Author: Lukas Zapletal <lzap+git(a)redhat.com>
Date: Wed Oct 27 12:45:55 2010 +0200
Fixing typo in driver_postgresql.py
diff --git a/backend/server/rhnSQL/driver_postgresql.py b/backend/server/rhnSQL/driver_postgresql.py
index 960ff74..d707990 100644
--- a/backend/server/rhnSQL/driver_postgresql.py
+++ b/backend/server/rhnSQL/driver_postgresql.py
@@ -21,6 +21,7 @@ import sys
import re
import psycopg2
import hashlib
+import decimal
import sql_base
from spacewalk.server import rhnSQL
@@ -114,9 +115,6 @@ def decimal2intfloat(dec, cursor):
except decimal.Inexact:
# if not exact return float
return float(dec)
- except:
- # if anything bad happends return float as well
- return float(dec)
finally:
decimal.setcontext(oldcontext)
@@ -152,7 +150,7 @@ class Database(sql_base.Database):
self.dbh = psycopg2.connect(database=self.database, user=self.username,
password=self.password, host=self.host, port=self.port)
# convert all DECIMAL types to float (let Python to choose one)
- DEC2INTFLOAT = psycopg2.extensions.new_type(psycopg2.extensions.DECIMAL.values,
+ DEC2INTFLOAT = psycopg2.extensions.new_type(psycopg2._psycopg.DECIMAL.values,
'DEC2INTFLOAT', decimal2intfloat)
psycopg2.extensions.register_type(DEC2INTFLOAT)
except Exception, e:
13 years, 6 months
backend/server
by Jan Pazdziora
backend/server/importlib/channelImport.py | 42 ------------------------------
1 file changed, 42 deletions(-)
New commits:
commit 409dab86f229ee60283eb5d614d46669b74cfc1c
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Oct 27 09:29:45 2010 +0200
Class ReleaseChannelMapImport does not seem to be called, removing.
diff --git a/backend/server/importlib/channelImport.py b/backend/server/importlib/channelImport.py
index d542e93..87122b3 100644
--- a/backend/server/importlib/channelImport.py
+++ b/backend/server/importlib/channelImport.py
@@ -335,48 +335,6 @@ class DistChannelMapImport(Import):
raise
self.backend.commit()
-class ReleaseChannelMapImport(Import):
- """
- Importer class to process Release Channel Mappings
- """
- def __init__(self, batch, backend):
- Import.__init__(self, batch, backend)
-
- def preprocess(self):
- # Processes the batch to a form more suitable for database
- # operations
- for rcm in self.batch:
- self.arches[rcm['arch']] = None
- self.channels[rcm['channel']] = None
-
- def fix(self):
- # Look up arches and channels
- self.backend.lookupChannelArches(self.arches)
- self.backend.lookupChannels(self.channels)
- for dcm in self.batch:
- arch = self.arches[rcm['arch']]
- if arch is None:
- # Invalid arch
- rcm.ignored = 1
- raise InvalidArchError(rcm['arch'],
- "Invalid release_channel_map arch %s" % rcm['arch'])
- channel = self.channels[rcm['channel']]
- if channel is None:
- rcm.ignored = 1
- raise InvalidChannelError(rcm['channel'],
- "Invalid release_channel_map channel %s" % rcm['channel'])
- rcm['arch'] = arch
- rcm['channel_id'] = channel['id']
-
-
- def submit(self):
- try:
- self.backend.processReleaseChannelMap(self.batch)
- except:
- self.backend.rollback()
- raise
- self.backend.commit()
-
# for testing only
if __name__ == '__main__':
13 years, 6 months