Please review this at http://codereview.appspot.com/190094/show

Affected files:
  M trytond/pool.py


Index: trytond/pool.py
===================================================================
--- a/trytond/pool.py
+++ b/trytond/pool.py
@@ -62,15 +62,19 @@
         Pool._lock.acquire()
         try:
             reload_p = False
+            prev_classes = {}
             for type in Pool.classes:
                 if Pool.classes[type]:
                     reload_p = True
+                prev_classes = Pool.classes[type]
                 Pool.classes[type] = {}
             try:
                 register_classes(reload_p=reload_p)
             except:
                 if not reload_p:
                     raise
+                for type in prev_classes:
+                    Pool.classes[type] = prev_classes[type]
             for db_name in Pool.database_list():
                 Pool(db_name).init()
         finally:



-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email: [email protected]
Jabber: [email protected]
Website: http://www.b2ck.com/
twitter: http://twitter.com/cedrickrier
identi.ca: http://identi.ca/cedrickrier

Attachment: pgpoIjvupuVfo.pgp
Description: PGP signature

Reply via email to