Skip to content

Commit 993ba09

Browse files
author
Adrien JUND
committed
Change "path letter" -> "path"
Change import cPickle
1 parent 7a0e8f6 commit 993ba09

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

fs/expose/dokan/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
import stat as statinfo
7272
import subprocess
7373
try:
74-
import cPickle
74+
import pickle as pickle
7575
except ImportError:
76-
import pickle as cPickle
76+
pass
7777
import datetime
7878
import ctypes
7979
from collections import deque
@@ -943,7 +943,7 @@ def _check_path_string(path): # TODO Probably os.path has a better check for th
943943

944944

945945
def mount(fs, path, foreground=False, ready_callback=None, unmount_callback=None, **kwds):
946-
"""Mount the given FS at the given path letter, using Dokan.
946+
"""Mount the given FS at the given path, using Dokan.
947947
948948
By default, this function spawns a new background process to manage the
949949
Dokan event loop. The return value in this case is an instance of the
@@ -1030,7 +1030,7 @@ def new_unmount():
10301030
def unmount(path):
10311031
"""Unmount the given path.
10321032
1033-
This function unmounts the dokan path mounted at the given path letter.
1033+
This function unmounts the dokan path mounted at the given path.
10341034
It works but may leave dangling processes; its better to use the "unmount"
10351035
method on the MountProcess class if you have one.
10361036
"""
@@ -1069,11 +1069,11 @@ def __init__(self, fs, path, dokan_opts={}, nowait=False, **kwds):
10691069
raise OSError("the dokan library is not available")
10701070
_check_path_string(path)
10711071
self.path = path
1072-
cmd = "try: import cPickle;\nexcept ImportError: import pickle as cPickle;\n"
1073-
cmd = cmd + "data = cPickle.loads(%s); "
1072+
cmd = "try: import pickle;\nexcept ImportError: import pickle as pickle;\n"
1073+
cmd = cmd + "data = pickle.loads(%s); "
10741074
cmd = cmd + "from fs.expose.dokan import MountProcess; "
10751075
cmd = cmd + "MountProcess._do_mount(data)"
1076-
cmd = cmd % (repr(cPickle.dumps((fs, path, dokan_opts, nowait), -1)),)
1076+
cmd = cmd % (repr(pickle.dumps((fs, path, dokan_opts, nowait), -1)),)
10771077
cmd = [sys.executable, "-c", cmd]
10781078
super(MountProcess, self).__init__(cmd, **kwds)
10791079

0 commit comments

Comments
 (0)