mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Better error handling. Thanks Lionel Ott!
This commit is contained in:
parent
d4eae3ef98
commit
45ef024c20
9
autojump
9
autojump
@ -4,7 +4,7 @@
|
|||||||
from __future__ import division
|
from __future__ import division
|
||||||
import cPickle
|
import cPickle
|
||||||
import getopt
|
import getopt
|
||||||
from sys import argv
|
from sys import argv,exit
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
|
|
||||||
@ -39,7 +39,12 @@ def match(path,pattern,path_dict,re_flags=0):
|
|||||||
del path_dict[path]
|
del path_dict[path]
|
||||||
return False
|
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")
|
dic_file=os.path.expanduser("~/.autojump_py")
|
||||||
try:
|
try:
|
||||||
aj_file=open(dic_file)
|
aj_file=open(dic_file)
|
||||||
|
Loading…
Reference in New Issue
Block a user