Kaydet (Commit) 7aa5b72a authored tarafından Faik Uygur's avatar Faik Uygur

Fix with breakage with python 2.6

üst aa33fae1
......@@ -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
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment