Fix with breakage with python 2.6
This commit is contained in:
@@ -69,21 +69,21 @@ class Package:
|
|||||||
return os.path.basename(found[0])
|
return os.path.basename(found[0])
|
||||||
|
|
||||||
def version_bump(self, *args):
|
def version_bump(self, *args):
|
||||||
for with in args:
|
for _with in args:
|
||||||
if with.types == CONFLICT and with.action == ADDED:
|
if _with.types == CONFLICT and _with.action == ADDED:
|
||||||
self.pspec.add_conflicts(with.data)
|
self.pspec.add_conflicts(_with.data)
|
||||||
|
|
||||||
if with.types == CONFLICT and with.action == REMOVED:
|
if _with.types == CONFLICT and _with.action == REMOVED:
|
||||||
self.pspec.remove_conflicts(with.data)
|
self.pspec.remove_conflicts(_with.data)
|
||||||
|
|
||||||
if with.types == DEPENDENCY and with.action == ADDED:
|
if _with.types == DEPENDENCY and _with.action == ADDED:
|
||||||
self.pspec.add_dependencies(with.data)
|
self.pspec.add_dependencies(_with.data)
|
||||||
|
|
||||||
if with.types == DEPENDENCY and with.action == REMOVED:
|
if _with.types == DEPENDENCY and _with.action == REMOVED:
|
||||||
self.pspec.remove_dependencies(with.data)
|
self.pspec.remove_dependencies(_with.data)
|
||||||
|
|
||||||
if with.types == VERSION and with.action == INIT:
|
if _with.types == VERSION and _with.action == INIT:
|
||||||
self.version = with.data
|
self.version = _with.data
|
||||||
|
|
||||||
self.pspec.update_history(self.date, self.version)
|
self.pspec.update_history(self.date, self.version)
|
||||||
self.actions.name = self.name
|
self.actions.name = self.name
|
||||||
|
|||||||
@@ -32,18 +32,18 @@ def repo_added_package(package, *args):
|
|||||||
dependencies = []
|
dependencies = []
|
||||||
conflicts = []
|
conflicts = []
|
||||||
|
|
||||||
for with in args:
|
for _with in args:
|
||||||
if with.types == CONFLICT and with.action == INIT:
|
if _with.types == CONFLICT and _with.action == INIT:
|
||||||
conflicts = with.data
|
conflicts = _with.data
|
||||||
|
|
||||||
if with.types == DEPENDENCY and with.action == INIT:
|
if _with.types == DEPENDENCY and _with.action == INIT:
|
||||||
dependencies = with.data
|
dependencies = _with.data
|
||||||
|
|
||||||
if with.types == VERSION and with.action == INIT:
|
if _with.types == VERSION and _with.action == INIT:
|
||||||
version = with.data
|
version = _with.data
|
||||||
|
|
||||||
if with.types == PARTOF and with.action == INIT:
|
if _with.types == PARTOF and _with.action == INIT:
|
||||||
partOf = with.data
|
partOf = _with.data
|
||||||
|
|
||||||
repodb[package] = Package(package, dependencies, conflicts, ver=version, partOf=partOf)
|
repodb[package] = Package(package, dependencies, conflicts, ver=version, partOf=partOf)
|
||||||
|
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
ADDED, REMOVED, INIT = range(3)
|
ADDED, REMOVED, INIT = range(3)
|
||||||
PARTOF, VERSION, CONFLICT, DEPENDENCY = range(4)
|
PARTOF, VERSION, CONFLICT, DEPENDENCY = range(4)
|
||||||
|
|
||||||
class with:
|
class With:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def with_action(types, action, data):
|
def with_action(types, action, data):
|
||||||
w = with()
|
w = With()
|
||||||
w.types = types
|
w.types = types
|
||||||
w.action = action
|
w.action = action
|
||||||
w.data = data
|
w.data = data
|
||||||
|
|||||||
Reference in New Issue
Block a user