[gedit] tools: make close more reliable
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] tools: make close more reliable
- Date: Wed, 3 Apr 2013 11:01:16 +0000 (UTC)
commit e02c4dd346450e75dcd2ef8c3128af0e59f2bf8a
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Apr 3 13:01:00 2013 +0200
tools: make close more reliable
plugins/externaltools/tools/capture.py | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/plugins/externaltools/tools/capture.py b/plugins/externaltools/tools/capture.py
index aeb58f9..8a36e7b 100644
--- a/plugins/externaltools/tools/capture.py
+++ b/plugins/externaltools/tools/capture.py
@@ -197,21 +197,21 @@ class Capture(GObject.Object):
return ret
def stop(self, error_code = -1):
- if self.pipe is not None:
- if self.idle_write_id:
- GLib.source_remove(self.idle_write_id)
- self.idle_write_id = 0
+ if self.idle_write_id:
+ GLib.source_remove(self.idle_write_id)
+ self.idle_write_id = 0
- if self.out_channel_id:
- self.out_channel.shutdown(True)
- self.out_channel = None
- self.out_channel_id = 0
+ if self.out_channel_id:
+ self.out_channel.shutdown(True)
+ self.out_channel = None
+ self.out_channel_id = 0
- if self.err_channel_id:
- self.err_channel.shutdown(True)
- self.err_channel = None
- self.err_channel = 0
+ if self.err_channel_id:
+ self.err_channel.shutdown(True)
+ self.err_channel = None
+ self.err_channel = 0
+ if self.pipe is not None:
if not self.tried_killing:
os.kill(self.pipe.pid, signal.SIGTERM)
self.tried_killing = True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]