# HG changeset patch # User Ludovic Chabant # Date 1437717813 25200 # Node ID a406b75c4beab0e9e43640c32ada11ca1c4d361d # Parent 35d4c172e5a6ee4d5c159eb761bfcf757f5407e1 sass: Overwrite the old map file with the new one always. diff -r 35d4c172e5a6 -r a406b75c4bea piecrust/processing/sass.py --- a/piecrust/processing/sass.py Thu Jul 23 23:02:07 2015 -0700 +++ b/piecrust/processing/sass.py Thu Jul 23 23:03:33 2015 -0700 @@ -101,10 +101,9 @@ if self.app.cache.enabled: src_map_file = out_path + '.map' dst_map_file = self._getMapPath(in_path) - try: - os.rename(src_map_file, dst_map_file) - except OSError: - pass + if os.path.exists(dst_map_file): + os.remove(dst_map_file) + os.rename(src_map_file, dst_map_file) if retcode != 0: raise Exception("Error occured in Sass compiler. Please check "