Fix with breakage with python 2.6

This commit is contained in:
Faik Uygur
2009-10-15 08:51:09 +00:00
parent aa33fae1d6
commit 7aa5b72a27
3 changed files with 22 additions and 22 deletions
+11 -11
View File
@@ -69,21 +69,21 @@ class Package:
return os.path.basename(found[0])
def version_bump(self, *args):
for with in args:
if with.types == CONFLICT and with.action == ADDED:
self.pspec.add_conflicts(with.data)
for _with in args:
if _with.types == CONFLICT and _with.action == ADDED:
self.pspec.add_conflicts(_with.data)
if with.types == CONFLICT and with.action == REMOVED:
self.pspec.remove_conflicts(with.data)
if _with.types == CONFLICT and _with.action == REMOVED:
self.pspec.remove_conflicts(_with.data)
if with.types == DEPENDENCY and with.action == ADDED:
self.pspec.add_dependencies(with.data)
if _with.types == DEPENDENCY and _with.action == ADDED:
self.pspec.add_dependencies(_with.data)
if with.types == DEPENDENCY and with.action == REMOVED:
self.pspec.remove_dependencies(with.data)
if _with.types == DEPENDENCY and _with.action == REMOVED:
self.pspec.remove_dependencies(_with.data)
if with.types == VERSION and with.action == INIT:
self.version = with.data
if _with.types == VERSION and _with.action == INIT:
self.version = _with.data
self.pspec.update_history(self.date, self.version)
self.actions.name = self.name
+9 -9
View File
@@ -32,18 +32,18 @@ def repo_added_package(package, *args):
dependencies = []
conflicts = []
for with in args:
if with.types == CONFLICT and with.action == INIT:
conflicts = with.data
for _with in args:
if _with.types == CONFLICT and _with.action == INIT:
conflicts = _with.data
if with.types == DEPENDENCY and with.action == INIT:
dependencies = with.data
if _with.types == DEPENDENCY and _with.action == INIT:
dependencies = _with.data
if with.types == VERSION and with.action == INIT:
version = with.data
if _with.types == VERSION and _with.action == INIT:
version = _with.data
if with.types == PARTOF and with.action == INIT:
partOf = with.data
if _with.types == PARTOF and _with.action == INIT:
partOf = _with.data
repodb[package] = Package(package, dependencies, conflicts, ver=version, partOf=partOf)
+2 -2
View File
@@ -14,12 +14,12 @@
ADDED, REMOVED, INIT = range(3)
PARTOF, VERSION, CONFLICT, DEPENDENCY = range(4)
class with:
class With:
def __init__(self):
pass
def with_action(types, action, data):
w = with()
w = With()
w.types = types
w.action = action
w.data = data