瀏覽代碼

Better error handling. Thanks Lionel Ott!

pull/18/head
Joel Schaerer 15 年之前
父節點
當前提交
45ef024c20
共有 1 個檔案被更改,包括 7 行新增2 行删除
  1. +7
    -2
      autojump

+ 7
- 2
autojump 查看文件

@ -4,7 +4,7 @@
from __future__ import division
import cPickle
import getopt
from sys import argv
from sys import argv,exit
import os
import signal
@ -39,7 +39,12 @@ def match(path,pattern,path_dict,re_flags=0):
del path_dict[path]
return False
optlist, args = getopt.getopt(argv[1:], 'a',['stat','import','completion'])
try:
optlist, args = getopt.getopt(argv[1:], 'a',['stat','import','completion'])
except getopt.GetoptError, e:
print "Unknown command line argument: %s" % e
exit(1)
dic_file=os.path.expanduser("~/.autojump_py")
try:
aj_file=open(dic_file)

Loading…
取消
儲存