summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-10-05 00:31:35 +0200
committerhut <hut@lavabit.com>2010-10-05 00:31:35 +0200
commit56570c32f2e18b86d453b0df4b583d12e9223729 (patch)
treeb7c56061d788a5862c21d311184072df6a72dc0f
parent70cd83bb27d6b4a3236af0f2c922fb1975af342a (diff)
downloadranger-56570c32f2e18b86d453b0df4b583d12e9223729.tar.gz
defaults.commands: Fixed :cd command without argument
-rw-r--r--ranger/defaults/commands.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index b143762a..157b148c 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -73,9 +73,8 @@ class cd(Command):
 
 	def execute(self):
 		line = parse(self.line)
-		try:
-			destination = line.rest(1)
-		except IndexError:
+		destination = line.rest(1)
+		if not destination:
 			destination = '~'
 
 		if destination == '-':