Fix with breakage with python 2.6
This commit is contained in:
+11
-11
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user