Merge ~powersj/cloud-init:1674317_fix_is_file into cloud-init:master

Proposed by Joshua Powers on 2017-03-20
Status: Merged
Merged at revision: 9040e78feb7c1bcf3a1dab0ee163efaa0d21612c
Proposed branch: ~powersj/cloud-init:1674317_fix_is_file
Merge into: cloud-init:master
Diff against target: 13 lines (+1/-1)
1 file modified
cloudinit/net/eni.py (+1/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve on 2017-03-20
cloud-init commiters 2017-03-20 Pending
Review via email: mp+320414@code.launchpad.net

Commit Message

net: Fix incorrect call to isfile

Previous commit 5beecdf introduced a regression by calling
os.path.is_file, a non-existent function. This changes that call to use
os.path.isfile.

LP: #1674317

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py
2index 9d39a2b..f471e05 100644
3--- a/cloudinit/net/eni.py
4+++ b/cloudinit/net/eni.py
5@@ -508,7 +508,7 @@ def available(target=None):
6 if not util.which(p, search=search, target=target):
7 return False
8 eni = util.target_path(target, 'etc/network/interfaces')
9- if not os.path.is_file(eni):
10+ if not os.path.isfile(eni):
11 return False
12
13 return True

Subscribers

People subscribed via source and target branches