summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/actions.py3
-rw-r--r--ranger/container/bookmarks.py5
2 files changed, 2 insertions, 6 deletions
diff --git a/ranger/actions.py b/ranger/actions.py
index d379c6cf..c1ea7485 100644
--- a/ranger/actions.py
+++ b/ranger/actions.py
@@ -110,14 +110,13 @@ class Actions(EnvironmentAware, SettingsAware):
 
 	def enter_bookmark(self, key):
 		"""Enter the bookmark with the name <key>"""
-		from ranger.container.bookmarks import NonexistantBookmark
 		try:
 			destination = self.bookmarks[key]
 			pwd = self.env.pwd
 			if destination.path != pwd.path:
 				self.bookmarks.enter(key)
 				self.bookmarks.remember(pwd)
-		except NonexistantBookmark:
+		except KeyError:
 			pass
 
 	def set_bookmark(self, key):
diff --git a/ranger/container/bookmarks.py b/ranger/container/bookmarks.py
index 6c2ebd63..854758bd 100644
--- a/ranger/container/bookmarks.py
+++ b/ranger/container/bookmarks.py
@@ -3,9 +3,6 @@ import re
 import os
 ALLOWED_KEYS = string.ascii_letters + string.digits + "`'"
 
-class NonexistantBookmark(Exception):
-	pass
-
 class Bookmarks(object):
 	"""Bookmarks is a container which associates keys with bookmarks.
 
@@ -74,7 +71,7 @@ class Bookmarks(object):
 		if key in self.dct:
 			return self.dct[key]
 		else:
-			raise NonexistantBookmark()
+			raise KeyError("Nonexistant Bookmark!")
 
 	def __setitem__(self, key, value):
 		"""Bookmark <value> to the key <key>.
01:18:43 -0400 more stubbed tests' href='/gbmor/getwtxt/commit/handlers_test.go?h=v0.4.6&id=126c00e4329f3e1f0efa210318f022f4248c53e2'>126c00e ^
126c00e ^


a1e9de4 ^
126c00e ^







126c00e ^


a1e9de4 ^
126c00e ^







126c00e ^


a1e9de4 ^
126c00e ^





a1e9de4 ^

126c00e ^

126c00e ^


a1e9de4 ^
126c00e ^







a1e9de4 ^
45a6722 ^
126c00e ^
a1e9de4 ^
45a6722 ^





a1e9de4 ^
d6fbc25 ^























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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116