diff --git a/arget b/arget index 3b8d795..978874c 100755 --- a/arget +++ b/arget @@ -107,7 +107,17 @@ if opt.pvlist: if opt.pvlist == '-': AF = sys.stdin else: - AF = open(opt.pvlist, 'r') + try: + AF = open(opt.pvlist, 'r') + except IOError: + print "--pv-list: No such file or directory: '%s'"%opt.pvlist + ret = 1 + try: + from os import EX_NOINPUT # Platform-specific + ret = EX_NOINPUT + except ImportError: + pass + sys.exit(ret) args += filter(lambda L:len(L) and L[0]!='#', map(str.rstrip, AF.readlines())) if opt.pvlist != '-': AF.close()