Skip to content

Commit

Permalink
Use removesuffix instead of strip
Browse files Browse the repository at this point in the history
  • Loading branch information
farnoy committed Mar 9, 2024
1 parent 5b79f3d commit dbc0b6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nm2nix.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
for i in nmfiles:
config = configparser.ConfigParser(delimiters=('=', ))
config.read(i)
connection_name = i.strip(".nmconnection")
connection_name = i.removesuffix(".nmconnection")
print(f" {connection_name} = {{")
for section in config.sections():
print(f" {section} = {{")
Expand Down

0 comments on commit dbc0b6a

Please sign in to comment.