[gnome-builder] rustup: use getattr() to access possible code attribute
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] rustup: use getattr() to access possible code attribute
- Date: Mon, 20 Mar 2017 00:25:49 +0000 (UTC)
commit b7eae4e745766bc8309a2c2ffb8aa0e319f5ac9c
Author: Christian Hergert <chergert redhat com>
Date: Sun Mar 19 17:23:47 2017 -0700
rustup: use getattr() to access possible code attribute
plugins/rustup/rustup_plugin/__init__.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/rustup/rustup_plugin/__init__.py b/plugins/rustup/rustup_plugin/__init__.py
index 34718bc..c542e27 100644
--- a/plugins/rustup/rustup_plugin/__init__.py
+++ b/plugins/rustup/rustup_plugin/__init__.py
@@ -408,7 +408,7 @@ class RustupInstaller(Ide.Transfer):
data_stream.read_line_async(GLib.PRIORITY_DEFAULT, cancellable, self._read_line_cb,
cancellable)
except Exception as ex:
# ignore cancelled error
- if ex.code is not 19:
+ if getattr(ex, 'code') != Gio.IOErrorEnum.CANCELLED:
print('_read_line_cb', ex)
def _wait_cb(self, sub_process, result, task):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]