gobject-introspection r989 - in trunk: . giscanner
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r989 - in trunk: . giscanner
- Date: Tue, 9 Dec 2008 15:19:57 +0000 (UTC)
Author: johan
Date: Tue Dec 9 15:19:57 2008
New Revision: 989
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=989&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/giscanner/cachestore.py
Modified: trunk/giscanner/cachestore.py
==============================================================================
--- trunk/giscanner/cachestore.py (original)
+++ trunk/giscanner/cachestore.py Tue Dec 9 15:19:57 2008
@@ -22,6 +22,7 @@
import cPickle
import hashlib
import os
+import shutil
import tempfile
@@ -105,8 +106,8 @@
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]