Skip to content

Commit

Permalink
Merge pull request #4 from farnoy/main
Browse files Browse the repository at this point in the history
Use removesuffix instead of strip
  • Loading branch information
Janik-Haag authored Mar 9, 2024
2 parents 5b79f3d + dbc0b6a commit aa300e8
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 aa300e8

Please sign in to comment.