Static analyzer detected a potential bad copy paste
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
1.In /salt/modules/win_dacl.py on line 1328 in the condition, the permission variable is checked, despite the fact that the acetype variable is actually used and it is advisable to replace it with "acetype = acetype.upper() if acetype else None". I suspect bad copy paste.
- In /salt/modules/schedule.py potentially outputs an incorrect error log, since parsing is performed for the current_time variable and the error exception is associated with this variable. In my opinion, it should be changed to "log.error("Date string could not be parsed: %s, %s", current_time, time_fmt)"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the referenced conditions in salt/modules/win_dacl.py and the date-parsing error handling in salt/modules/schedule.py. Confirm which variables are actually used at each location, make the two messages or assignments consistent with the issue, and verify that both modules retain their existing behavior apart from the reported corrections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100