Skip to content

Commit

Permalink
Remove redundant cleanup, handled already by __exit__
Browse files Browse the repository at this point in the history
  • Loading branch information
cal4 committed Jun 18, 2024
1 parent a61f6b2 commit 4a598fc
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ def main():
args = argumentParser()
setupLogging()
loadedAccounts = setupAccounts()
# Register the cleanup function to be called on script exit
atexit.register(cleanupChromeProcesses)

# Load previous day's points data
previous_points_data = load_previous_points_data()
Expand Down Expand Up @@ -121,16 +119,6 @@ def setupLogging():
)


def cleanupChromeProcesses():
# Use psutil to find and terminate Chrome processes
for process in psutil.process_iter(["pid", "name"]):
if process.info["name"] == "chrome.exe":
try:
psutil.Process(process.info["pid"]).terminate()
except (psutil.NoSuchProcess, psutil.AccessDenied):
pass


def argumentParser() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="MS Rewards Farmer")
parser.add_argument(
Expand Down

0 comments on commit 4a598fc

Please sign in to comment.