projects
/
invirt/packages/invirt-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3e410a
)
Fix formatting of docstrings
author
Ben Steffen
<bds@mit.edu>
Tue, 26 Nov 2019 19:52:21 +0000
(14:52 -0500)
committer
Ben Steffen
<bds@mit.edu>
Tue, 26 Nov 2019 19:52:21 +0000
(14:52 -0500)
python/invirt/config.py
patch
|
blob
|
history
diff --git
a/python/invirt/config.py
b/python/invirt/config.py
index
3a0bf2d
..
ae960b1
100644
(file)
--- a/
python/invirt/config.py
+++ b/
python/invirt/config.py
@@
-14,7
+14,8
@@
cache_path = '/var/lib/invirt/cache.json'
lock_path = '/var/lib/invirt/cache.lock'
def augment(d1, d2):
lock_path = '/var/lib/invirt/cache.lock'
def augment(d1, d2):
- """Splice dict-tree d2 into d1. Return d1.
+ """
+ Splice dict-tree d2 into d1. Return d1.
d2 may be None for an empty dict-tree, because yaml.load produces that.
d2 may be None for an empty dict-tree, because yaml.load produces that.
@@
-25,6
+26,7
@@
def augment(d1, d2):
>>> d
{'a': {'b', 1, 'd': 3}, 'c': 2}
"""
>>> d
{'a': {'b', 1, 'd': 3}, 'c': 2}
"""
+
if d2 is None:
return d1
for k in d2:
if d2 is None:
return d1
for k in d2:
@@
-35,7
+37,8
@@
def augment(d1, d2):
return d1
def run_parts_list(dirname):
return d1
def run_parts_list(dirname):
- """Reimplements Debian's run-parts --list.
+ """
+ Reimplements Debian's run-parts --list.
One difference from run-parts's behavior: run-parts --list /foo/
will give output like /foo//bar, but run_parts_list('/foo/') gives
One difference from run-parts's behavior: run-parts --list /foo/
will give output like /foo//bar, but run_parts_list('/foo/') gives
@@
-43,6
+46,7
@@
def run_parts_list(dirname):
Matches documented behavior of run-parts in debianutils v2.28.2, dated 2007.
"""
Matches documented behavior of run-parts in debianutils v2.28.2, dated 2007.
"""
+
# From run-parts(8).
lanana_re = re.compile('^[a-z0-9]+$')
lsb_re = re.compile('^_?([a-z0-9_.]+-)+[a-z0-9]+$')
# From run-parts(8).
lanana_re = re.compile('^[a-z0-9]+$')
lsb_re = re.compile('^_?([a-z0-9_.]+-)+[a-z0-9]+$')