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):
4f8fa2a6e4800c725822feb0f7edebd3'>^
7dc8fef8 ^
4833bc23 ^

4ea0f69a ^

240394a4 ^

240394a4 ^

240394a4 ^
7dc8fef8 ^
9e89f023 ^
36e4e71e ^
20ab9343 ^

20ab9343 ^





4ea0f69a ^

240394a4 ^
7dc8fef8 ^
36e4e71e ^

4a383291 ^
78a7d762 ^
e952d6cb ^
78a7d762 ^
e952d6cb ^
4ea0f69a ^

7838675f ^

07069888 ^

07069888 ^
7838675f ^

1891697f ^
755e7df1 ^
a3d5f44b ^
66a8d4ff ^
7838675f ^
7dc8fef8 ^
80a93f0b ^
500cf259 ^

7dc8fef8 ^


80a93f0b ^
240394a4 ^



240394a4 ^
7dc8fef8 ^
240394a4 ^

96004e71 ^
240394a4 ^

96004e71 ^
240394a4 ^



e5fb3d74 ^
240394a4 ^

240394a4 ^
7dc8fef8 ^



7b33b517 ^

176e8a68 ^
7b33b517 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98