r186 - branches/rewrite/src
Nat Budin
partial-mirror-devel@lists.alioth.debian.org
Thu, 22 Jul 2004 20:50:28 -0600
Author: natbudin-guest
Date: Thu Jul 22 20:50:28 2004
New Revision: 186
Modified:
branches/rewrite/src/PackageList.py
Log:
Fixed bugs. Now the tests pass.
Modified: branches/rewrite/src/PackageList.py
==============================================================================
--- branches/rewrite/src/PackageList.py (original)
+++ branches/rewrite/src/PackageList.py Thu Jul 22 20:50:28 2004
@@ -34,14 +34,14 @@
if self._name.has_key(package['Package']):
raise NameError, package['Package'] + 'already included.'
- if self._subsection[package['Section']] is None:
+ if not self._subsection.has_key(package['Section']):
self._subsection[package['Section']] = []
- if self._priority[package['Priority']] is None:
+ if not self._priority.has_key(package['Priority']):
self._priority[package['Priority']] = []
- self._name[package.Name] = package
- self._subsection[package.Section].append(package)
- self._priority[package.Priority].append(package)
+ self._name[package['Package']] = package
+ self._subsection[package['Section']].append(package)
+ self._priority[package['Priority']].append(package)
def remove(self, package):
@@ -49,5 +49,5 @@
raise NameError, package['Package'] + 'do not exist.'
del self._name[package['Package']]
- self._subsection[package.Section].remove(package)
- self._priority[package.Priority].remove(package)
+ self._subsection[package['Section']].remove(package)
+ self._priority[package['Priority']].remove(package)