[gnome-keysign: 52/65] bluetoothoffer: Use raw_input in python2
- From: Gitlab System User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keysign: 52/65] bluetoothoffer: Use raw_input in python2
- Date: Tue, 3 Oct 2017 11:41:15 +0000 (UTC)
commit ed7a8d1f7ca0a625369192e8d5756aae26d6aa8c
Author: Tobias Mueller <muelli cryptobitch de>
Date: Wed Sep 13 18:52:33 2017 +0200
bluetoothoffer: Use raw_input in python2
keysign/bluetoothoffer.py | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/keysign/bluetoothoffer.py b/keysign/bluetoothoffer.py
index c802b0d..c1858a7 100644
--- a/keysign/bluetoothoffer.py
+++ b/keysign/bluetoothoffer.py
@@ -3,6 +3,8 @@ from bluetooth import BluetoothSocket, RFCOMM
import dbus
import select
import socket
+import sys
+
if __name__ == "__main__":
import gi
gi.require_version('Gtk', '3.0')
@@ -12,6 +14,9 @@ if __name__ == "__main__":
from twisted.internet import threads
from twisted.internet.defer import inlineCallbacks, returnValue
+if sys.version < '3':
+ input = raw_input
+
if __name__ == "__main__" and __package__ is None:
logging.getLogger().error("You seem to be trying to execute " +
"this script directly which is discouraged. " +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]