Mercurial > piecrust2
diff piecrust/processing/sass.py @ 499:a406b75c4bea
sass: Overwrite the old map file with the new one always.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 23 Jul 2015 23:03:33 -0700 |
parents | aa686b8fbfd0 |
children | 81d9c3a3a0b5 |
line wrap: on
line diff
--- 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 "