Skip to content

Commit

Permalink
Merge pull request #132 from consideRatio/pr/cache-systemd-version
Browse files Browse the repository at this point in the history
Cache check of systemd version
  • Loading branch information
consideRatio committed Jun 8, 2023
2 parents 5b91309 + 4d3076b commit ba5d382
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions systemdspawner/systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

import asyncio
import functools
import os
import re
import shlex
Expand Down Expand Up @@ -222,6 +223,7 @@ async def reset_service(unit_name):
await proc.wait()


@functools.lru_cache
def get_systemd_version():
"""
Returns systemd's major version, or None if failing to do so.
Expand Down

0 comments on commit ba5d382

Please sign in to comment.