Show More
@@ -99,7 +99,7 b' if ispy3:' | |||||
99 | # Otherwise non-ASCII filenames in existing repositories would be |
|
99 | # Otherwise non-ASCII filenames in existing repositories would be | |
100 | # corrupted. |
|
100 | # corrupted. | |
101 | # This must be set once prior to any fsencode/fsdecode calls. |
|
101 | # This must be set once prior to any fsencode/fsdecode calls. | |
102 | sys._enablelegacywindowsfsencoding() |
|
102 | sys._enablelegacywindowsfsencoding() # pytype: disable=module-attr | |
103 |
|
103 | |||
104 | fsencode = os.fsencode |
|
104 | fsencode = os.fsencode | |
105 | fsdecode = os.fsdecode |
|
105 | fsdecode = os.fsdecode |
@@ -10,11 +10,12 b' from . import (' | |||||
10 | ) |
|
10 | ) | |
11 |
|
11 | |||
12 | try: |
|
12 | try: | |
13 | import _winreg as winreg |
|
13 | import _winreg as winreg # pytype: disable=import-error | |
14 |
|
14 | |||
15 | winreg.CloseKey |
|
15 | winreg.CloseKey | |
16 | except ImportError: |
|
16 | except ImportError: | |
17 | import winreg |
|
17 | # py2 only | |
|
18 | import winreg # pytype: disable=import-error | |||
18 |
|
19 | |||
19 | # MS-DOS 'more' is the only pager available by default on Windows. |
|
20 | # MS-DOS 'more' is the only pager available by default on Windows. | |
20 | fallbackpager = b'more' |
|
21 | fallbackpager = b'more' |
@@ -26,11 +26,12 b' from . import (' | |||||
26 | ) |
|
26 | ) | |
27 |
|
27 | |||
28 | try: |
|
28 | try: | |
29 | import _winreg as winreg |
|
29 | import _winreg as winreg # pytype: disable=import-error | |
30 |
|
30 | |||
31 | winreg.CloseKey |
|
31 | winreg.CloseKey | |
32 | except ImportError: |
|
32 | except ImportError: | |
33 | import winreg |
|
33 | # py2 only | |
|
34 | import winreg # pytype: disable=import-error | |||
34 |
|
35 | |||
35 | osutil = policy.importmod('osutil') |
|
36 | osutil = policy.importmod('osutil') | |
36 |
|
37 | |||
@@ -282,7 +283,7 b' def setbinary(fd):' | |||||
282 | # fileno(), usually set to -1. |
|
283 | # fileno(), usually set to -1. | |
283 | fno = getattr(fd, 'fileno', None) |
|
284 | fno = getattr(fd, 'fileno', None) | |
284 | if fno is not None and fno() >= 0: |
|
285 | if fno is not None and fno() >= 0: | |
285 | msvcrt.setmode(fno(), os.O_BINARY) |
|
286 | msvcrt.setmode(fno(), os.O_BINARY) # pytype: disable=module-attr | |
286 |
|
287 | |||
287 |
|
288 | |||
288 | def pconvert(path): |
|
289 | def pconvert(path): |
General Comments 0
You need to be logged in to leave comments.
Login now