summaryrefslogtreecommitdiffstats
path: root/Lib/netrc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/netrc.py')
-rw-r--r--Lib/netrc.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/netrc.py b/Lib/netrc.py
index bbb3d23..1d90f5d 100644
--- a/Lib/netrc.py
+++ b/Lib/netrc.py
@@ -127,15 +127,15 @@ class netrc:
rep = ""
for host in self.hosts.keys():
attrs = self.hosts[host]
- rep = rep + "machine "+ host + "\n\tlogin " + repr(attrs[0]) + "\n"
+ rep += f"machine {host}\n\tlogin {attrs[0]}\n"
if attrs[1]:
- rep = rep + "account " + repr(attrs[1])
- rep = rep + "\tpassword " + repr(attrs[2]) + "\n"
+ rep += f"\taccount {attrs[1]}\n"
+ rep += f"\tpassword {attrs[2]}\n"
for macro in self.macros.keys():
- rep = rep + "macdef " + macro + "\n"
+ rep += f"macdef {macro}\n"
for line in self.macros[macro]:
- rep = rep + line
- rep = rep + "\n"
+ rep += line
+ rep += "\n"
return rep
if __name__ == '__main__':