# HG changeset patch # User Bjoern Ricks # Date 1278605319 0 # Node ID 89ecca5d262e641f23b0d2d057b727a16da32da5 # Parent 6cab748288f752ba0bbfb5a41f60fc25c505e7be check if config file exists to get usefull error output diff -r 6cab748288f7 -r 89ecca5d262e treepkg/readconfig.py --- a/treepkg/readconfig.py Thu Jul 08 16:00:32 2010 +0000 +++ b/treepkg/readconfig.py Thu Jul 08 16:08:39 2010 +0000 @@ -9,6 +9,7 @@ import sys import shlex +import os.path from ConfigParser import SafeConfigParser, NoOptionError import util @@ -125,6 +126,9 @@ configuration of the tree packager. The packagers list contains one dict with the configuratiin for each packager. """ + if not os.path.exists(filename): + print >>sys.stderr, "Config file %s does not exist" % filename + sys.exit(2) parser = SafeConfigParser() parser.read([filename])