|
71 | 71 | import stat as statinfo |
72 | 72 | import subprocess |
73 | 73 | try: |
74 | | - import cPickle |
| 74 | + import pickle as pickle |
75 | 75 | except ImportError: |
76 | | - import pickle as cPickle |
| 76 | + pass |
77 | 77 | import datetime |
78 | 78 | import ctypes |
79 | 79 | from collections import deque |
@@ -943,7 +943,7 @@ def _check_path_string(path): # TODO Probably os.path has a better check for th |
943 | 943 |
|
944 | 944 |
|
945 | 945 | 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. |
947 | 947 |
|
948 | 948 | By default, this function spawns a new background process to manage the |
949 | 949 | Dokan event loop. The return value in this case is an instance of the |
@@ -1030,7 +1030,7 @@ def new_unmount(): |
1030 | 1030 | def unmount(path): |
1031 | 1031 | """Unmount the given path. |
1032 | 1032 |
|
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. |
1034 | 1034 | It works but may leave dangling processes; its better to use the "unmount" |
1035 | 1035 | method on the MountProcess class if you have one. |
1036 | 1036 | """ |
@@ -1069,11 +1069,11 @@ def __init__(self, fs, path, dokan_opts={}, nowait=False, **kwds): |
1069 | 1069 | raise OSError("the dokan library is not available") |
1070 | 1070 | _check_path_string(path) |
1071 | 1071 | 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); " |
1074 | 1074 | cmd = cmd + "from fs.expose.dokan import MountProcess; " |
1075 | 1075 | 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)),) |
1077 | 1077 | cmd = [sys.executable, "-c", cmd] |
1078 | 1078 | super(MountProcess, self).__init__(cmd, **kwds) |
1079 | 1079 |
|
|
0 commit comments