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.
This commit is contained in:
Faik Uygur
2006-08-29 13:25:01 +00:00
parent 2641e21cc9
commit e55f3d4c14
+5 -8
View File
@@ -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.