root/trunk/umitCore/OptionsConf.py @ 2678

Revision 2678, 1.0 kB (checked in by boltrix, 6 years ago)

Made some bug fixes, and improved configuration file search system. Now Umit won't fail if a config file doesn't exist, has wrong permissions or can't be found: in such cases, a temporary file is created with the default configuration file content and then it is used from there. Also, removed direct access to some filenames at Path to avoid exceptions that could crash the app.

RevLine 
[2678]1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4# Copyright (C) 2007 Adriano Monteiro Marques.
5#
6# Author: Adriano Monteiro Marques <py.adriano@gmail.com>
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22from umitCore.GetConfigFile import get_config_file
23from umitCore.UserConf import options_content
24
25options_file = get_config_file("options", options_content)
Note: See TracBrowser for help on using the browser.