mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-02 13:50:59 +00:00
check-files.py: readability improvement in permission check
This commit is contained in:
parent
fb8c373a15
commit
de12823a18
|
@ -91,8 +91,9 @@ class PermissionIssueTracker(FileIssueTracker):
|
||||||
heading = "Incorrect permissions:"
|
heading = "Incorrect permissions:"
|
||||||
|
|
||||||
def check_file_for_issue(self, filepath):
|
def check_file_for_issue(self, filepath):
|
||||||
if not (os.access(filepath, os.X_OK) ==
|
is_executable = os.access(filepath, os.X_OK)
|
||||||
filepath.endswith((".sh", ".pl", ".py"))):
|
should_be_executable = filepath.endswith((".sh", ".pl", ".py"))
|
||||||
|
if is_executable != should_be_executable:
|
||||||
self.files_with_issues[filepath] = None
|
self.files_with_issues[filepath] = None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue