From 1881477f5c5ac67065b539b173223213a561b194 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 4 Oct 2011 00:14:14 +0200 Subject: [PATCH] Fix transaction check. --- python/pakfire/filelist.py | 20 ++++++++++---------- python/pakfire/transaction.py | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/python/pakfire/filelist.py b/python/pakfire/filelist.py index 2eb7e7fc0..14e7af927 100644 --- a/python/pakfire/filelist.py +++ b/python/pakfire/filelist.py @@ -23,16 +23,6 @@ class _File(object): def __init__(self, pakfire): self.pakfire = pakfire - -class File(_File): - def __init__(self, pakfire): - _File.__init__(self, pakfire) - - self.name = "" - self.pkg = None - self.size = -1 - self.hash1 = "" - def __cmp__(self, other): ret = cmp(self.name, other.name) @@ -51,6 +41,16 @@ class File(_File): return False +class File(_File): + def __init__(self, pakfire): + _File.__init__(self, pakfire) + + self.name = "" + self.pkg = None + self.size = -1 + self.hash1 = "" + + class FileDatabase(_File): def __init__(self, pakfire, db, row_id): _File.__init__(self, pakfire) diff --git a/python/pakfire/transaction.py b/python/pakfire/transaction.py index 487e2795e..15cea9d7b 100644 --- a/python/pakfire/transaction.py +++ b/python/pakfire/transaction.py @@ -130,7 +130,7 @@ class TransactionCheck(object): if file.is_dir(): continue - if not self.filelist.has_key(file): + if not self.filelist.has_key(file.name): continue for f in self.filelist[file.name]: -- 2.39.5