[meld] meldapp: Fix bad remote invocation not exiting



commit 5300f257a289a18482dfc8b60e8668a82b5a2841
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Wed Aug 16 09:09:48 2017 +1000

    meldapp: Fix bad remote invocation not exiting
    
    The symptom here was that if you started another Meld process, and then
    used e.g., `meld -n qwe://somethinginvalid`, the second process would
    print the error feedback and just hang until the original process
    exited.
    
    This is a Python 3 special. I haven't delved into the depths of why,
    but I assume it's traceback chaining.

 meld/meldapp.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/meld/meldapp.py b/meld/meldapp.py
index b109967..c1bbafc 100644
--- a/meld/meldapp.py
+++ b/meld/meldapp.py
@@ -351,6 +351,9 @@ class MeldApp(Gtk.Application):
                 parser.local_error(error)
             else:
                 print(error)
+            # Delete the error here; otherwise we keep the local app
+            # alive in a reference cycle, and the command line hangs.
+            del error
 
         if parser.should_exit:
             cleanup()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]