Skip to content
Snippets Groups Projects
Commit 996abe5a authored by Jonas Braathen's avatar Jonas Braathen
Browse files

Add missing encoding to open() for fix linting error

parent 432c6069
No related branches found
No related tags found
1 merge request!37Bump dependencies
Pipeline #91698 passed
......@@ -10,7 +10,11 @@ class Command(BaseCommand):
def handle(self, *args, **options):
try:
with open(settings.NOTIFICATION_PUBLISHER["daemon"]["pid_file"], "r") as f:
with open(
settings.NOTIFICATION_PUBLISHER["daemon"]["pid_file"],
"r",
encoding="utf-8",
) as f:
pid = int(f.read().strip())
os.kill(pid, signal.SIGINT)
......
......@@ -10,7 +10,11 @@ class Command(BaseCommand):
def handle(self, *args, **options):
try:
with open(settings.SCHEDULE_TASKS["daemon"]["pid_file"], "r") as f:
with open(
settings.SCHEDULE_TASKS["daemon"]["pid_file"],
"r",
encoding="utf-8",
) as f:
pid = int(f.read().strip())
os.kill(pid, signal.SIGINT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment