summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-19 00:34:37 +0200
committerhut <hut@lavabit.com>2010-04-19 00:34:37 +0200
commit34414c3eae0c2b4d3a866ad00b2d995bb3312f53 (patch)
tree6de3e8648410cebdaa5d4a129687759e211f81f2
parent0f0416ebe698fb0e9c876d34c79e6c0179449e1b (diff)
downloadranger-34414c3eae0c2b4d3a866ad00b2d995bb3312f53.tar.gz
api.commands: fixed python3 compatibiliy error
-rw-r--r--ranger/api/commands.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/api/commands.py b/ranger/api/commands.py
index db6c1a3c..fcbc5113 100644
--- a/ranger/api/commands.py
+++ b/ranger/api/commands.py
@@ -106,11 +106,11 @@ class Command(FileManagerAware):
 		try:
 			# are we at the end of a directory?
 			if rel_dest.endswith('/') or rel_dest == '':
-				_, dirnames, _ = os.walk(abs_dest).next()
+				_, dirnames, _ = next(os.walk(abs_dest))
 
 			# are we in the middle of the filename?
 			else:
-				_, dirnames, _ = os.walk(abs_dirname).next()
+				_, dirnames, _ = next(os.walk(abs_dirname))
 				dirnames = [dn for dn in dirnames \
 						if dn.startswith(rel_basename)]
 		except (OSError, StopIteration):
@@ -155,12 +155,12 @@ class Command(FileManagerAware):
 		try:
 			# are we at the end of a directory?
 			if rel_dest.endswith('/') or rel_dest == '':
-				_, dirnames, filenames = os.walk(abs_dest).next()
+				_, dirnames, filenames = next(os.walk(abs_dest))
 				names = dirnames + filenames
 
 			# are we in the middle of the filename?
 			else:
-				_, dirnames, filenames = os.walk(abs_dirname).next()
+				_, dirnames, filenames = next(os.walk(abs_dirname))
 				names = [name for name in (dirnames + filenames) \
 						if name.startswith(rel_basename)]
 		except (OSError, StopIteration):