Merge ~smoser/cloud-init:bug/1621180 into cloud-init:master
Proposed by
Scott Moser
on 2016-09-07
| 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 |
|---|---|---|---|
| ChristianEhrhardt (community) | Approve on 2016-09-08 | ||
| Ryan Harper | 2016-09-07 | Approve on 2016-09-07 | |
|
Review via email:
|
|||
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.
| Scott Moser (smoser) wrote : | # |
| Ryan Harper (raharper) wrote : | # |
I need to go read some with deeper call-by-
review:
Approve
review:
Approve


$ 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))