[session] Allow self._open to be False in __enter__
I do not understand why this assertion was there in the first place. And
currently, it makes running any migration impossible. Hopefully, someone may
be able to explain.
See also commit b48020a80dc3 which mentions this assertion and suggests to
remove it.
--- a/cubicweb/server/session.py Fri Oct 21 18:35:46 2016 +0200
+++ b/cubicweb/server/session.py Wed Oct 12 17:03:02 2016 +0200
@@ -381,7 +381,7 @@
# life cycle handling ####################################################
def __enter__(self):
- assert self._open is None # first opening
+ assert not self._open
self._open = True
self.cnxset = self.repo._get_cnxset()
return self