summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/config/commands.py2
-rw-r--r--ranger/core/loader.py2
-rw-r--r--ranger/core/tab.py4
-rw-r--r--ranger/ext/keybinding_parser.py2
-rw-r--r--ranger/ext/widestring.py2
-rw-r--r--ranger/gui/bar.py2
6 files changed, 7 insertions, 7 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 82fc8889..b6206666 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -791,7 +791,7 @@ class bulkrename(Command):
         from os.path import relpath
         from ranger.container.file import File
         from ranger.ext.shell_escape import shell_escape as esc
-        py3 = sys.version_info.major >= 3
+        py3 = sys.version_info[0] >= 3
 
         # Create and edit the file list
         filenames = [relpath(f.path, start=self.fm.thisdir.path)
diff --git a/ranger/core/loader.py b/ranger/core/loader.py
index 3fb2073e..cc1d6a20 100644
--- a/ranger/core/loader.py
+++ b/ranger/core/loader.py
@@ -134,7 +134,7 @@ class CommandLoader(Loadable, SignalDispatcher, FileManagerAware):
         self.kill_on_pause = kill_on_pause
 
     def generate(self):
-        py3 = sys.version_info.major >= 3
+        py3 = sys.version_info[0] >= 3
         if self.input:
             stdin = PIPE
         else:
diff --git a/ranger/core/tab.py b/ranger/core/tab.py
index ae10d027..f3320e0e 100644
--- a/ranger/core/tab.py
+++ b/ranger/core/tab.py
@@ -22,9 +22,9 @@ class Tab(FileManagerAware, SettingsAware):
         # weak references are not equal to the original object when tested with
         # "==", and this breaks _set_thisfile_from_signal and _on_tab_change.
         self.fm.signal_bind('move', self._set_thisfile_from_signal, priority=0.1,
-                weak=(sys.version_info.major >= 3))
+                weak=(sys.version_info[0] >= 3))
         self.fm.signal_bind('tab.change', self._on_tab_change,
-                weak=(sys.version_info.major >= 3))
+                weak=(sys.version_info[0] >= 3))
 
     def _set_thisfile_from_signal(self, signal):
         if self == signal.tab:
diff --git a/ranger/ext/keybinding_parser.py b/ranger/ext/keybinding_parser.py
index b325ad9a..0dbb26bd 100644
--- a/ranger/ext/keybinding_parser.py
+++ b/ranger/ext/keybinding_parser.py
@@ -5,7 +5,7 @@ import sys
 import copy
 import curses.ascii
 
-PY3 = sys.version_info.major >= 3
+PY3 = sys.version_info[0] >= 3
 digits = set(range(ord('0'), ord('9')+1))
 
 # Arbitrary numbers which are not used with curses.KEY_XYZ
diff --git a/ranger/ext/widestring.py b/ranger/ext/widestring.py
index 32aba5c8..15ccaffe 100644
--- a/ranger/ext/widestring.py
+++ b/ranger/ext/widestring.py
@@ -5,7 +5,7 @@
 import sys
 from unicodedata import east_asian_width
 
-PY3 = sys.version_info.major >= 3
+PY3 = sys.version_info[0] >= 3
 ASCIIONLY = set(chr(c) for c in range(1, 128))
 NARROW = 1
 WIDE = 2
diff --git a/ranger/gui/bar.py b/ranger/gui/bar.py
index b4bfe950..e37e21be 100644
--- a/ranger/gui/bar.py
+++ b/ranger/gui/bar.py
@@ -3,7 +3,7 @@
 
 from ranger.ext.widestring import WideString, utf_char_width
 import sys
-PY3 = sys.version_info.major >= 3
+PY3 = sys.version_info[0] >= 3
 
 class Bar(object):
     left = None