From be46ddef9acbb1bd5efe1c3a6b113e84de4feaa1 Mon Sep 17 00:00:00 2001 From: Dingyuan Wang Date: Fri, 26 Jun 2015 21:52:53 +0800 Subject: [PATCH] use shutil.move for all platforms in case of different filesystems --- jieba/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jieba/__init__.py b/jieba/__init__.py index 6dfc23a..2ec7548 100644 --- a/jieba/__init__.py +++ b/jieba/__init__.py @@ -15,10 +15,7 @@ from hashlib import md5 from ._compat import * from . import finalseg -if os.name == 'nt': - from shutil import move as _replace_file -else: - _replace_file = os.rename +from shutil import move as _replace_file _get_module_path = lambda path: os.path.normpath(os.path.join(os.getcwd(), os.path.dirname(__file__), path))