|
10 | 10 |
|
11 | 11 | """
|
12 | 12 |
|
13 |
| -try: |
14 |
| - import os |
15 |
| -except ImportError: |
16 |
| - import _dummy_os as os |
| 13 | +import os |
17 | 14 | import stat
|
18 | 15 | from itertools import filterfalse
|
19 | 16 | from types import GenericAlias
|
@@ -160,17 +157,17 @@ def phase2(self): # Distinguish files, directories, funnies
|
160 | 157 | a_path = os.path.join(self.left, x)
|
161 | 158 | b_path = os.path.join(self.right, x)
|
162 | 159 |
|
163 |
| - ok = 1 |
| 160 | + ok = True |
164 | 161 | try:
|
165 | 162 | a_stat = os.stat(a_path)
|
166 | 163 | except OSError:
|
167 | 164 | # print('Can\'t stat', a_path, ':', why.args[1])
|
168 |
| - ok = 0 |
| 165 | + ok = False |
169 | 166 | try:
|
170 | 167 | b_stat = os.stat(b_path)
|
171 | 168 | except OSError:
|
172 | 169 | # print('Can\'t stat', b_path, ':', why.args[1])
|
173 |
| - ok = 0 |
| 170 | + ok = False |
174 | 171 |
|
175 | 172 | if ok:
|
176 | 173 | a_type = stat.S_IFMT(a_stat.st_mode)
|
@@ -245,7 +242,7 @@ def report_full_closure(self): # Report on self and subdirs recursively
|
245 | 242 |
|
246 | 243 | methodmap = dict(subdirs=phase4,
|
247 | 244 | same_files=phase3, diff_files=phase3, funny_files=phase3,
|
248 |
| - common_dirs = phase2, common_files=phase2, common_funny=phase2, |
| 245 | + common_dirs=phase2, common_files=phase2, common_funny=phase2, |
249 | 246 | common=phase1, left_only=phase1, right_only=phase1,
|
250 | 247 | left_list=phase0, right_list=phase0)
|
251 | 248 |
|
|
0 commit comments