@@ -141,7 +141,7 @@ def checkwalk(arg, dirname, names):
141141 octperms = oct(targetperms)
142142 if S_ISDIR(mode) and (mode & targetperms) != targetperms:
143143 arg.ERRORS += 1
144- print(C_('directory permissions must be %(octperms)s: %(path)s'), )
144+ print(C_('directory permissions must be %(octperms)s: %(path)s') % locals() )
145145 if STATE.FIX:
146146 print(C_('(fixing)'))
147147 os.chmod(path, mode | targetperms)
@@ -150,7 +150,7 @@ def checkwalk(arg, dirname, names):
150150 elif os.path.splitext(path)[1] in ('.py', '.pyc', '.pyo'):
151151 octperms = oct(PYFILEPERMS)
152152 if mode & PYFILEPERMS != PYFILEPERMS:
153- print(C_('source perms must be %(octperms)s: %(path)s'), )
153+ print(C_('source perms must be %(octperms)s: %(path)s') % locals() )
154154 arg.ERRORS += 1
155155 if STATE.FIX:
156156 print(C_('(fixing)'))
@@ -161,7 +161,7 @@ def checkwalk(arg, dirname, names):
161161 # Article files must be group writeable
162162 octperms = oct(ARTICLEFILEPERMS)
163163 if mode & ARTICLEFILEPERMS != ARTICLEFILEPERMS:
164- print(C_('article db files must be %(octperms)s: %(path)s'), )
164+ print(C_('article db files must be %(octperms)s: %(path)s') % locals() )
165165 arg.ERRORS += 1
166166 if STATE.FIX:
167167 print(C_('(fixing)'))
@@ -187,7 +187,7 @@ def checkall():
187187 continue
188188 if (mode & DIRPERMS) != DIRPERMS:
189189 STATE.ERRORS += 1
190- print(C_('directory must be at least 02775: %(d)s'), )
190+ print(C_('directory must be at least 02775: %(d)s') % locals() )
191191 if STATE.FIX:
192192 print(C_('(fixing)'))
193193 os.chmod(d, mode | DIRPERMS)
@@ -204,7 +204,7 @@ def checkarchives():
204204 mode = statmode(private)
205205 if mode & S_IROTH:
206206 STATE.ERRORS += 1
207- print(C_('%(private)s must not be other-readable'), )
207+ print(C_('%(private)s must not be other-readable') % locals() )
208208 if STATE.FIX:
209209 print(C_('(fixing)'))
210210 os.chmod(private, mode & ~S_IROTH)
@@ -253,7 +253,7 @@ def checkarchivedbs():
253253 continue
254254 if mode & S_IRWXO:
255255 STATE.ERRORS += 1
256- print(C_('%(dbdir)s "other" perms must be 000'), )
256+ print(C_('%(dbdir)s "other" perms must be 000') % locals() )
257257 if STATE.FIX:
258258 print(C_('(fixing)'))
259259 os.chmod(dbdir, mode & ~S_IRWXO)
@@ -272,7 +272,7 @@ def checkcgi():
272272 mode = statmode(path)
273273 if mode & S_IXGRP and not mode & S_ISGID:
274274 STATE.ERRORS += 1
275- print(C_('%(path)s must be set-gid'), )
275+ print(C_('%(path)s must be set-gid') % locals() )
276276 if STATE.FIX:
277277 print(C_('(fixing)'))
278278 os.chmod(path, mode | S_ISGID)
@@ -286,7 +286,7 @@ def checkmail():
286286 mode = statmode(wrapper)
287287 if not mode & S_ISGID:
288288 STATE.ERRORS += 1
289- print(C_('%(wrapper)s must be set-gid'), )
289+ print(C_('%(wrapper)s must be set-gid') % locals() )
290290 if STATE.FIX:
291291 print(C_('(fixing)'))
292292 os.chmod(wrapper, mode | S_ISGID)
@@ -346,7 +346,7 @@ def checkdata():
346346 continue
347347 if (mode & targetmode) != targetmode:
348348 STATE.ERRORS += 1
349- print(C_('file permissions must be at least 660: %(path)s'), )
349+ print(C_('file permissions must be at least 660: %(path)s') % locals() )
350350 if STATE.FIX:
351351 print(C_('(fixing)'))
352352 os.chmod(path, mode | targetmode)
0 commit comments