import ConfigParser
from utils import *
-cfg = ConfigParser.ConfigParser()
config_file_path = os.path.join(os.path.dirname(sys.argv[0]),'config')
+if not os.path.exists(config_file_path):
+ print '''
+The configuration file '%s' does not exist.
+Please create this file and fill in the configuration data
+of your certificates so that 'cam' can operate.
+'''
+ sys.exit(1)
+
+cfg = ConfigParser.ConfigParser()
cfg.read(config_file_path)
ca = cfg2dict(cfg, 'ca')
ca_base = cfg.get('global', 'root')