diff --git a/libraries/dumpTools.py b/libraries/dumpTools.py index 84c1b09d3..579bccae1 100644 --- a/libraries/dumpTools.py +++ b/libraries/dumpTools.py @@ -62,10 +62,11 @@ def dumpobj(name, object, completePath = False, ignoreExceptions = True): @input: object, file object @output: file object, pointer to the beginning ''' -def serialize(object, f): +def serialize(object, f, do_seek = True): pickle.dump(object,f) f.flush() - f.seek(0) + if do_seek: + f.seek(0) return f ''' diff --git a/libraries/entropy.py b/libraries/entropy.py index e54209e2d..eb0139f78 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -162,6 +162,7 @@ class EquoInterface(TextInterface): type = "warning" ) continue + self.closeAllRepositoryDatabases(mask_clear = False) def setup_default_file_perms(self, filepath): # setup file permissions @@ -367,7 +368,7 @@ class EquoInterface(TextInterface): self.clientDbconn.closeDB() self.openClientDatabase() - def closeAllRepositoryDatabases(self): + def closeAllRepositoryDatabases(self, mask_clear = True): for item in self.repoDbCache: self.repoDbCache[item].closeDB() self.repoDbCache.clear() @@ -11811,8 +11812,10 @@ class SocketHostInterface: Entropy = intf(*args, **kwds) Entropy.urlFetcher = SocketUrlFetcher Entropy.updateProgress = self.remoteUpdateProgress - if Entropy.clientDbconn != None: + try: Entropy.clientDbconn.updateProgress = self.remoteUpdateProgress + except AttributeError: + pass Entropy.progress = self.remoteUpdateProgress return Entropy @@ -12022,6 +12025,16 @@ class SocketHostInterface: 'syntax': " end", 'from': str(self), }, + 'session_config': { + 'auth': False, + 'built_in': True, + 'cb': self.docmd_session_config, + 'args': ["session","myargs"], + 'as_user': False, + 'desc': "set session configuration options", + 'syntax': " session_config