Merge ~smoser/cloud-init:bug/1621180 into cloud-init:master
Proposed by
Scott Moser
Status: | Merged |
---|---|
Merged at revision: | 058dd753b91126a504a82d4a48305e9d56116f73 |
Proposed branch: | ~smoser/cloud-init:bug/1621180 |
Merge into: | cloud-init:master |
Diff against target: |
66 lines (+29/-2) 2 files modified
cloudinit/config/cc_apt_configure.py (+7/-2) tests/unittests/test_handler/test_handler_apt_conf_v1.py (+22/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christian Ehrhardt | Approve | ||
Ryan Harper | Approve | ||
Review via email: mp+305137@code.launchpad.net |
Commit message
apt config conversion: treat empty string as not provided.
Old behavior allowed a user to provide:
apt_mirror: ""
And that was the same as:
apt_mirror: null
and the same as having not specified apt_mirror at all. This maintains
that behavior for all old string values.
LP: #1621180
To post a comment you must log in.
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
$ python ./mytest.py
before deepcopy
f1 is f: True
f1 == f: True
after deepcopy
f1 is f: False
f1 == f: True
$ cat mytest.py
#!/usr/bin/python
import copy
f = {'a': {'b': {'c': {1}}}}
f1 = f
print("before deepcopy")
print("f1 is f: %s" % (f1 is f))
print("f1 == f: %s" % (f1 == f))
f = copy.deepcopy(f)
print("after deepcopy")
print("f1 is f: %s" % (f1 is f))
print("f1 == f: %s" % (f1 == f))