[01:36] thx smoser I'm reworking ifconfig-drop branch to incorporate more review comments, it'll be tomorrow before it's ready [16:42] just found a bug in the dropping ifconfig/route branch on devices which don't have addresses (like deactivated wirelesss interfaces). [16:42] tweaking the logic and also attempting a regex approach instead of this separate for loop nonsense to see if it's faster [16:43] s/separate/decoupled/ [18:57] blackboxsw: help ? [18:57] http://paste.ubuntu.com/p/sWZg7wbPNH/ [18:58] checking. /me is neck deep in regex atm [19:00] blackboxsw: don't die [19:01] so python only imports a module once right, once the mock is active it would apply to the global wouldn't it until the mock is released. [19:01] smoser: are cloudint.util and cloudint.ssh_util.util the same thing? [19:01] * blackboxsw checks to be sure [19:01] yeah they are the same [19:01] i think this a case where yhou need to mock the local util.write_file [19:01] not the one in the class [19:01] because it's already been imported at this point [19:02] https://docs.python.org/3/library/unittest.mock.html#id5 the bit about mocking where something is used [19:02] and importing puts things in the local namespace, not the source namespace (iirc) [19:02] it's different if you do a from ... import too [19:06] blackboxsw: yeah, they're the same thing. and yeah nacc is right i'm sure, bu t i just should have somehow known this before. i'm sure we do stuff like this otherplaces in tests. [19:06] but oh well [19:06] smoser: i ran into this while writing some of our tests for git-ubuntu [19:07] smoser: if you had just run 'import cloudinit', i believe your code would dtrt [19:07] smoser: but since you import a specific module from cloudinit, it 'imports' it into the current modules' namespace [19:08] so there's now a testme.util which is what you actually want to mock, i think [19:08] (or so, there are some examples i've found in the past for what you are supposed to use for hte module/class name) [19:08] i can keep the logic in my head for about 1 minute and then it slips away again :) [19:09] smoser: the frustrating part is, it also depends on how the tests run -- so sometimes things work when they really probably shouldn't (or you end up getting one test affecting all other tests in the same class/test file) [23:05] heyja [23:09] I'm currently playing around with the cloud init user_data config [23:09] I'm wondering... if the image I want to configure with cloud-init has a lot of stuff configured in its /etc/cloud/cloud.cfg (a debian in this case) how can I override these defaults? [23:10] the debian default cloud.cfg adds a default "debian" user. I don't want that, but it seems to be specified there and it gets added even if i specify my own users in my user_data