summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-22 23:36:08 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-22 23:36:08 -0700
commitfdbd341aae7a41d3985e544fe40375087056b1f9 (patch)
tree1070e98bf315379f0b3fef2225cd6b56e15ab912 /cloudinit/config
parentf8413af9168adc0ad7c730b9adea9eba67949ba5 (diff)
downloadvyos-cloud-init-fdbd341aae7a41d3985e544fe40375087056b1f9.tar.gz
vyos-cloud-init-fdbd341aae7a41d3985e544fe40375087056b1f9.zip
Use os.path.join instead of custom string path formation
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_apt_update_upgrade.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/config/cc_apt_update_upgrade.py b/cloudinit/config/cc_apt_update_upgrade.py
index 8ecd9c94..42b6f3e9 100644
--- a/cloudinit/config/cc_apt_update_upgrade.py
+++ b/cloudinit/config/cc_apt_update_upgrade.py
@@ -133,7 +133,7 @@ def getkeybyid(keyid, keyserver):
def mirror2lists_fileprefix(mirror):
string = mirror
- # take of http:// or ftp://
+ # take off http:// or ftp://
if string.endswith("/"):
string = string[0:-1]
pos = string.find("://")
@@ -144,8 +144,8 @@ def mirror2lists_fileprefix(mirror):
def rename_apt_lists(omirror, new_mirror, lists_d="/var/lib/apt/lists"):
- oprefix = "%s/%s" % (lists_d, mirror2lists_fileprefix(omirror))
- nprefix = "%s/%s" % (lists_d, mirror2lists_fileprefix(new_mirror))
+ oprefix = os.path.join(lists_d, mirror2lists_fileprefix(omirror))
+ nprefix = os.path.join(lists_d, mirror2lists_fileprefix(new_mirror))
if oprefix == nprefix:
return
olen = len(oprefix)