fix wrong return None result in changeAttrExpression
authorAlexander Marchuk <Alexander.Marchuk@jetbrains.com>
Thu, 28 Aug 2014 14:24:16 +0000 (18:24 +0400)
committerAlexander Marchuk <Alexander.Marchuk@jetbrains.com>
Thu, 28 Aug 2014 14:24:16 +0000 (18:24 +0400)
python/helpers/pydev/pydevd_vars.py

index 0cc45f73710fe2daff352c4538d9d0c2872f16b8..5ae987d67dacea788d0216d9213ef511837928bb 100644 (file)
@@ -364,7 +364,7 @@ def changeAttrExpression(thread_id, frame_id, attr, expression):
         if isinstance(frame, DjangoTemplateFrame):
             result = eval(expression, frame.f_globals, frame.f_locals)
             frame.changeVariable(attr, result)
-            return
+            return result
 
         if attr[:7] == "Globals":
             attr = attr[8:]
@@ -375,7 +375,7 @@ def changeAttrExpression(thread_id, frame_id, attr, expression):
             if pydevd_save_locals.is_save_locals_available():
                 frame.f_locals[attr] = eval(expression, frame.f_globals, frame.f_locals)
                 pydevd_save_locals.save_locals(frame)
-                return
+                return frame.f_locals[attr]
 
             #default way (only works for changing it in the topmost frame)
             result = eval(expression, frame.f_globals, frame.f_locals)