From e55f3d4c14f62c8ebcd1d9a39af04950528bc4b2 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Tue, 29 Aug 2006 13:25:01 +0000 Subject: [PATCH] Why are we passing this? FileError exception comes from sha1_file and here it means that if root can not open an _existing_ config file for reading to calculate sha1 then pass it. If this is true there must be something _wrong_. sha1_file already raises the problem for us, so do not pass this. --- pisi/atomicoperations.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index 53e1132e..de7f2106 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -262,14 +262,11 @@ class Install(AtomicOperation): def check_config_changed(config): fpath = pisi.util.join_path(ctx.config.dest_dir(), config.path) if os.path.exists(fpath): - try: - if pisi.util.sha1_file(fpath) != config.hash: - config_changed.append(fpath) - if os.path.exists(fpath + '.old'): - os.unlink(fpath + '.old') - os.rename(fpath, fpath + '.old') - except pisi.util.FileError, e: - pass + if pisi.util.sha1_file(fpath) != config.hash: + config_changed.append(fpath) + if os.path.exists(fpath + '.old'): + os.unlink(fpath + '.old') + os.rename(fpath, fpath + '.old') # old config files are kept as they are. New config files from the installed # packages are saved with ".newconfig" string appended to their names.