git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
systematic use of context managers for dealing with files instead of open()/close...
[nepi.git]
/
src
/
nepi
/
resources
/
netns
/
netnswrapper.py
diff --git
a/src/nepi/resources/netns/netnswrapper.py
b/src/nepi/resources/netns/netnswrapper.py
index
6c0968b
..
4456f97
100644
(file)
--- a/
src/nepi/resources/netns/netnswrapper.py
+++ b/
src/nepi/resources/netns/netnswrapper.py
@@
-69,6
+69,7
@@
class NetNSWrapper(object):
if clazzname == "open":
path = args[0]
mode = args[1]
+ # xxx Thierry: not sure where this gets closed
obj = open(path, mode)
else:
clazz = getattr(netns, clazzname)