2008-12-09 Johan Dahlin <johan@async.com.br>
* giscanner/cachestore.py (CacheStore.store): Use
shutil.move instead of os.rename, since it will
automatically fall back to copying+remove if the
src directory is on a different partition from
the dst directory.
svn path=/trunk/; revision=989
+2008-12-09 Johan Dahlin <johan@async.com.br>
+
+ * giscanner/cachestore.py (CacheStore.store): Use
+ shutil.move instead of os.rename, since it will
+ automatically fall back to copying+remove if the
+ src directory is on a different partition from
+ the dst directory.
+
2008-12-08 Tristan Van Berkom <tristan.van.berkom@gmail.com>
- Bug 563742 – introspection should record the introduced version of
+ Bug 563742 – introspection should record the introduced version of
symbols marked with the "Since:" tag
reviewed by: Johan
import cPickle
import hashlib
import os
+import shutil
import tempfile
raise
try:
- os.rename(tmp_filename, store_filename)
- except OSError, e:
+ shutil.move(tmp_filename, store_filename)
+ except IOError, e:
# Permission denied
if e.errno == errno.EACCES:
self._remove_filename(tmp_filename)