From 11392c49e80e3e84c5ffd1fc36bd3cc3a3914cc4 Mon Sep 17 00:00:00 2001 From: Alexander D Date: Tue, 6 Mar 2018 21:54:26 +0200 Subject: [PATCH] get QR with urllib if http is not supported on gio when user doesn't have http gvfs backend installed, querying qr code fails with error 15 - Operation not supported. so application should retry request with urllib in this case too. --- syncthing_gtk/iddialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncthing_gtk/iddialog.py b/syncthing_gtk/iddialog.py index 22dd2f89..bfc0f524 100644 --- a/syncthing_gtk/iddialog.py +++ b/syncthing_gtk/iddialog.py @@ -84,7 +84,7 @@ def cb_syncthing_qr(self, io, results, *a): self["vQR"].set_from_file(tf.name) os.unlink(tf.name) except GLib.Error, e: - if e.code == 14: + if e.code in [14, 15]: # Unauthorized. Grab CSRF token from daemon and try again log.warning("Failed to load image using glib. Retrying with urllib2.") self.load_data_urllib()