Skip to content

Commit 41a0b92

Browse files
committedJun 19, 2022
pythongh-93991: Changed condition check to boolean instream of 0/1
1 parent 27b9894 commit 41a0b92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎Lib/filecmp.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,17 @@ def phase2(self): # Distinguish files, directories, funnies
157157
a_path = os.path.join(self.left, x)
158158
b_path = os.path.join(self.right, x)
159159

160-
ok = 1
160+
ok = True
161161
try:
162162
a_stat = os.stat(a_path)
163163
except OSError:
164164
# print('Can\'t stat', a_path, ':', why.args[1])
165-
ok = 0
165+
ok = False
166166
try:
167167
b_stat = os.stat(b_path)
168168
except OSError:
169169
# print('Can\'t stat', b_path, ':', why.args[1])
170-
ok = 0
170+
ok = False
171171

172172
if ok:
173173
a_type = stat.S_IFMT(a_stat.st_mode)

0 commit comments

Comments
 (0)
Please sign in to comment.