From 7aa5b72a270c622b52d2954d230504dc3f70f5bd Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 15 Oct 2009 08:51:09 +0000 Subject: [PATCH] Fix with breakage with python 2.6 --- pisi/scenarioapi/package.py | 22 +++++++++++----------- pisi/scenarioapi/repoops.py | 18 +++++++++--------- pisi/scenarioapi/withops.py | 4 ++-- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pisi/scenarioapi/package.py b/pisi/scenarioapi/package.py index 770709ef..f8ce6aa5 100644 --- a/pisi/scenarioapi/package.py +++ b/pisi/scenarioapi/package.py @@ -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 diff --git a/pisi/scenarioapi/repoops.py b/pisi/scenarioapi/repoops.py index 8f1541a0..14ea481e 100644 --- a/pisi/scenarioapi/repoops.py +++ b/pisi/scenarioapi/repoops.py @@ -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) diff --git a/pisi/scenarioapi/withops.py b/pisi/scenarioapi/withops.py index 56fe5fca..dd1eb634 100644 --- a/pisi/scenarioapi/withops.py +++ b/pisi/scenarioapi/withops.py @@ -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