Replace singleton lists with None defaults

Hit an issue trying to run zuul-bwrap locally and I didn't pass
--ro-bind or --rw-bind which meant setMountsMap was being passed None
values. In fixing that, it seems to me that perhaps the list values were
not intentionally singletons.

However - it's possible they were and I'm breaking some intended logic
here.

Change-Id: I3a30bd3d4439c27483c45f86d3d9ae1741a40a38
This commit is contained in:
Monty Taylor 2017-07-28 15:59:37 -05:00
parent 05be49c552
commit b41a5d9e8f
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 5 additions and 1 deletions

View File

@ -83,7 +83,11 @@ class BubblewrapDriver(Driver, WrapperInterface):
def stop(self):
pass
def setMountsMap(self, ro_dirs=[], rw_dirs=[]):
def setMountsMap(self, ro_dirs=None, rw_dirs=None):
if not ro_dirs:
ro_dirs = []
if not rw_dirs:
rw_dirs = []
self.mounts_map = {'ro': ro_dirs, 'rw': rw_dirs}
def getPopen(self, **kwargs):