diff --git a/gui/startup.py b/gui/startup.py index 2accbd0..e57e389 100644 --- a/gui/startup.py +++ b/gui/startup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012, 2013, 2015 Tom Tromey +# Copyright (C) 2012, 2013, 2015, 2023 Tom Tromey # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,12 +15,7 @@ import gdb import threading -try: - import queue -except ImportError: - # Python 2. - import Queue - queue = Queue +import queue import os import os.path import gui @@ -42,8 +37,7 @@ _event_queue = queue.Queue() def send_to_gtk(func): _event_queue.put(func) - # The payload is arbitrary, and bytes(1) is chosen to work on both - # Python 2 and Python 3. + # The payload is arbitrary. os.write(write_pipe, bytes(1)) class _GtkThread(threading.Thread): diff --git a/gui/storage.py b/gui/storage.py index 34aba46..bcf2bac 100644 --- a/gui/storage.py +++ b/gui/storage.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 Tom Tromey +# Copyright (C) 2015, 2023 Tom Tromey # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,12 +18,7 @@ from gi.repository import GLib import os import errno -try: - import configparser -except ImportError: - # Python 2. - import ConfigParser - configparser = ConfigParser +import configparser import atexit class StorageManager: