Can be part of a pkcs11 URI so let's drop support for ';' for comments.
I've never seen anyone use this so it shouldn't be a problem to drop
this.
value: Optional[str] = None
for line in textwrap.dedent(path.read_text()).splitlines():
- # Systemd unit files allow both '#' and ';' to indicate comments so we do the same.
- for c in ("#", ";"):
- comment = line.find(c)
- if comment >= 0:
- line = line[:comment]
+ comment = line.find("#")
+ if comment >= 0:
+ line = line[:comment]
if not line.strip():
continue
ALLCAPS=txt
# Comment
- ; Another comment
[EmptySection]
[AnotherSection]
EmptyValue=