summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--combox/events.py2
-rw-r--r--combox/file.py4
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 65cf4ae..29e2f6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2015-12-21 Siddharth Ravikumar <sravik@bgsu.edu>
+ * combox/events.py (NodeDirMonitor.on_moved): Now uses
+ `os.renames` function instead `os.rename` to create intermediate
+ directories if they're non-existent.
+ * combox/file.py (move_nodedir, move_shards): Now uses
+ `os.renames` function instead `os.rename` to create intermediate
+ directories if they're non-existent.
+
+2015-12-21 Siddharth Ravikumar <sravik@bgsu.edu>
+
commit 8c86e7c28738c66c0e04ae7886b44dbcdfc6369e
* combox/events.py (ComboxDirMonitor.on_modified)
diff --git a/combox/events.py b/combox/events.py
index be37337..fa238ee 100644
--- a/combox/events.py
+++ b/combox/events.py
@@ -506,7 +506,7 @@ class NodeDirMonitor(LoggingEventHandler):
return
else:
try:
- os.rename(src_cb_path, dest_cb_path)
+ os.renames(src_cb_path, dest_cb_path)
except OSError, e:
log_e("Jeez, failed to rename path. %r" % e)
self.silo.node_rem(silo_node_dict, src_cb_path)
diff --git a/combox/file.py b/combox/file.py
index b02c1ab..2f65e05 100644
--- a/combox/file.py
+++ b/combox/file.py
@@ -200,7 +200,7 @@ def move_nodedir(src, dest, config):
src_dir_path = path.join(node, src_rel_path)
dest_dir_path = path.join(node, dest_rel_path)
try:
- os.rename(src_dir_path, dest_dir_path)
+ os.renames(src_dir_path, dest_dir_path)
except OSError, e:
log_e("Error when trying to rename %s -> %s" % (src_dir_path, dest_dir_path))
@@ -267,7 +267,7 @@ def move_shards(src, dest, config):
dest_shard = "%s.shard%s" % (path.join(node, dest_rel_path),
shard_no)
try:
- os.rename(src_shard, dest_shard)
+ os.renames(src_shard, dest_shard)
except OSError, e:
log_e("Error when trying to rename shard %s -> %s" % (src_shard, dest_shard))