diff --git a/pyrpl/pyrpl.py b/pyrpl/pyrpl.py index 12b6f176..7e410ee9 100644 --- a/pyrpl/pyrpl.py +++ b/pyrpl/pyrpl.py @@ -166,16 +166,10 @@ from . import user_config_dir from ._version import __version__ -# input is the wrong function in python 2 -try: - raw_input -except NameError: # Python 3 - raw_input = input - -try: - basestring # in python 2 -except: - basestring = (str, bytes) + +raw_input = input + +basestring = (str, bytes) default_pyrpl_config = {'name': 'default_pyrpl_instance', diff --git a/pyrpl/widgets/spinbox.py b/pyrpl/widgets/spinbox.py index 5f747631..18f4a991 100644 --- a/pyrpl/widgets/spinbox.py +++ b/pyrpl/widgets/spinbox.py @@ -4,10 +4,8 @@ import logging import sys -if sys.version_info < (3,): - integer_types = (int, long) -else: - integer_types = (int,) + +integer_types = (int,) class NumberSpinBox(QtWidgets.QWidget):