Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor unix cronjob plugin #1009

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JSCU-CNI
Copy link
Contributor

This PR refactors the unix cronjob plugin and adds tests.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 4 lines in your changes missing coverage. Please review.

Project coverage is 77.96%. Comparing base (385512c) to head (e03cf74).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
dissect/target/plugins/os/unix/cronjobs.py 88.88% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1009      +/-   ##
==========================================
+ Coverage   77.77%   77.96%   +0.18%     
==========================================
  Files         327      327              
  Lines       28659    28658       -1     
==========================================
+ Hits        22290    22342      +52     
+ Misses       6369     6316      -53     
Flag Coverage Δ
unittests 77.96% <88.88%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

for file in self.crontabs:
for line in file.open("rt"):
line = line.strip()
if line.startswith("#") or not len(line):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if line.startswith("#") or not len(line):
if line.startswith("#") or not line:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants