summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien JUND <adrien.jund@islog.com>2016-10-20 16:10:11 +0200
committerAdrien JUND <adrien.jund@islog.com>2016-10-20 16:10:11 +0200
commit993ba098865c9025cf2335b72881e593b12249dd (patch)
tree68e502b43f1fe75637390c47db99e16f5cbba20a
parent7a0e8f66785f165d76477105c2298e03eb5d0695 (diff)
downloadpyfilesystem-git-993ba098865c9025cf2335b72881e593b12249dd.tar.gz
Change "path letter" -> "path"
Change import cPickle
-rw-r--r--fs/expose/dokan/__init__.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/expose/dokan/__init__.py b/fs/expose/dokan/__init__.py
index bfc5294..d0e2a8f 100644
--- a/fs/expose/dokan/__init__.py
+++ b/fs/expose/dokan/__init__.py
@@ -71,9 +71,9 @@ import time
import stat as statinfo
import subprocess
try:
- import cPickle
+ import pickle as pickle
except ImportError:
- import pickle as cPickle
+ pass
import datetime
import ctypes
from collections import deque
@@ -943,7 +943,7 @@ def _check_path_string(path): # TODO Probably os.path has a better check for th
def mount(fs, path, foreground=False, ready_callback=None, unmount_callback=None, **kwds):
- """Mount the given FS at the given path letter, using Dokan.
+ """Mount the given FS at the given path, using Dokan.
By default, this function spawns a new background process to manage the
Dokan event loop. The return value in this case is an instance of the
@@ -1030,7 +1030,7 @@ def mount(fs, path, foreground=False, ready_callback=None, unmount_callback=None
def unmount(path):
"""Unmount the given path.
- This function unmounts the dokan path mounted at the given path letter.
+ This function unmounts the dokan path mounted at the given path.
It works but may leave dangling processes; its better to use the "unmount"
method on the MountProcess class if you have one.
"""
@@ -1069,11 +1069,11 @@ class MountProcess(subprocess.Popen):
raise OSError("the dokan library is not available")
_check_path_string(path)
self.path = path
- cmd = "try: import cPickle;\nexcept ImportError: import pickle as cPickle;\n"
- cmd = cmd + "data = cPickle.loads(%s); "
+ cmd = "try: import pickle;\nexcept ImportError: import pickle as pickle;\n"
+ cmd = cmd + "data = pickle.loads(%s); "
cmd = cmd + "from fs.expose.dokan import MountProcess; "
cmd = cmd + "MountProcess._do_mount(data)"
- cmd = cmd % (repr(cPickle.dumps((fs, path, dokan_opts, nowait), -1)),)
+ cmd = cmd % (repr(pickle.dumps((fs, path, dokan_opts, nowait), -1)),)
cmd = [sys.executable, "-c", cmd]
super(MountProcess, self).__init__(cmd, **kwds)