Modify ↓
#11737 closed defect (fixed)
Remove mixed Tab/Space from source
Reported by: | Chris W. | Owned by: | Chris W. |
---|---|---|---|
Priority: | normal | Component: | TracPermissionFilterPlugin |
Severity: | trivial | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
Hi,
I noticed that in line 74 of file tracpermissionfilter.py tabs are used for indentation while the rest of the file uses spaces. The code works (well, I hope, not yet tested...) but it's really confusing when your editor is set to tabs=4 spaces.
I inserted comments in the code snippet below instead of providing a patch file.
def check_permission(self, action, username, resource, perm): _admin = False if self.adminmeta: if action == 'TRAC_ADMIN': return # <-- This line has 2 tabs elif 'TRAC_ADMIN' in perm: _admin = True # <-- This line has 16 spaces if self.blacklist and len(self.blacklist) != 0: if not _admin and action in self.blacklist: return False if self.whitelist and len(self.whitelist) != 0: if not _admin and action not in self.whitelist: return False return
Attachments (0)
Change History (2)
comment:1 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Owner: | changed from Sergio Talens-Oliag to Chris W. |
---|
Note: See
TracTickets for help on using
tickets.
In 13912: