From 99400080aa6206cbae1895e3b9800124f94e3d7a Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 28 Sep 2011 21:25:31 +0200 Subject: minor optimization in ranger.py --- ranger.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'ranger.py') diff --git a/ranger.py b/ranger.py index c4f68923..cc402a44 100755 --- a/ranger.py +++ b/ranger.py @@ -1,7 +1,5 @@ #!/usr/bin/python -O # -*- coding: utf-8 -*- -# -# Ranger: Explore your forest of files from inside your terminal # Copyright (C) 2009, 2010 Roman Zimbelmann # # This program is free software: you can redistribute it and/or modify @@ -40,10 +38,7 @@ import os.path # Need to find out whether or not the flag --clean was used ASAP, # because --clean is supposed to disable bytecode compilation -try: - argv = sys.argv[0:sys.argv.index('--')] -except: - argv = sys.argv +argv = sys.argv[1:sys.argv.index('--')] if '--' in sys.argv else sys.argv[1:] sys.dont_write_bytecode = '-c' in argv or '--clean' in argv # Set the actual docstring -- cgit 1.4.1-2-gfad0