combox

split and encrypted files between online file storage providers
git clone git://git.ricketyspace.net/combox.git
Log | Files | Refs

commit 6c45b36e0e2923422fe9e116f517a3af7ecb4b37
parent c348c16a6659f961d17046ddf3351208b7fcb5f7
Author: Siddharth Ravikumar <sravik@bgsu.edu>
Date:   Mon, 21 Dec 2015 20:29:15 -0500

Now use `os.renames` instead `os.rename` function.

Diffstat:
ChangeLog | 9+++++++++
combox/events.py | 2+-
combox/file.py | 4++--
3 files changed, 12 insertions(+), 3 deletions(-)

diff --git 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 @@ -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 @@ -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))