Changeset 872 for pykota/trunk
- Timestamp:
- 03/29/03 14:08:28 (22 years ago)
- Location:
- pykota/trunk
- Files:
-
- 8 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r871 r872 22 22 wants to continue with the installation or abort it. 23 23 24 - The configuration file pykota.conf is now expected to be 25 found in /etc instead of in /etc/cups 26 The installation script prompts the user to see if he 27 wants to move an old configuration file to the new location 28 if needed. 29 24 30 - Improved documentation. 25 31 … … 27 33 Server is listening, see sample configuration file for details. 28 34 29 - Better error handling if PygreSQL is not installed or not 30 available. 35 - Better general error handling. 31 36 32 37 - 1.01 : -
pykota/trunk/po/en/pykota.po
r852 r872 15 15 # 16 16 # $Log$ 17 # Revision 1.11 2003/03/29 13:08:28 jalet 18 # Configuration is now expected to be found in /etc/pykota.conf instead of 19 # in /etc/cups/pykota.conf 20 # Installation script can move old config files to the new location if needed. 21 # Better error handling if configuration file is absent. 22 # 17 23 # Revision 1.10 2003/03/15 23:01:28 jalet 18 24 # New mailto option in configuration file added. … … 226 232 msgid "Option mailto in section %s only supports values in %s" 227 233 msgstr "" 234 235 msgid "Configuration file %s not found." 236 msgstr "" -
pykota/trunk/po/fr/pykota.po
r852 r872 15 15 # 16 16 # $Log$ 17 # Revision 1.9 2003/03/29 13:08:28 jalet 18 # Configuration is now expected to be found in /etc/pykota.conf instead of 19 # in /etc/cups/pykota.conf 20 # Installation script can move old config files to the new location if needed. 21 # Better error handling if configuration file is absent. 22 # 17 23 # Revision 1.8 2003/03/15 23:01:28 jalet 18 24 # New mailto option in configuration file added. … … 234 240 msgid "Option mailto in section %s only supports values in %s" 235 241 msgstr "L'option mailto dans la section %s supporte seulement les valeurs %s" 242 243 msgid "Configuration file %s not found." 244 msgstr "Fichier de configuration %s non trouv� -
pykota/trunk/po/pykota.pot
r852 r872 15 15 # 16 16 # $Log$ 17 # Revision 1.11 2003/03/29 13:08:28 jalet 18 # Configuration is now expected to be found in /etc/pykota.conf instead of 19 # in /etc/cups/pykota.conf 20 # Installation script can move old config files to the new location if needed. 21 # Better error handling if configuration file is absent. 22 # 17 23 # Revision 1.10 2003/03/15 23:01:28 jalet 18 24 # New mailto option in configuration file added. … … 226 232 msgid "Option mailto in section %s only supports values in %s" 227 233 msgstr "" 234 235 msgid "Configuration file %s not found." 236 msgstr "" -
pykota/trunk/pykota/config.py
r854 r872 15 15 # 16 16 # $Log$ 17 # Revision 1.20 2003/03/29 13:08:28 jalet 18 # Configuration is now expected to be found in /etc/pykota.conf instead of 19 # in /etc/cups/pykota.conf 20 # Installation script can move old config files to the new location if needed. 21 # Better error handling if configuration file is absent. 22 # 17 23 # Revision 1.19 2003/03/16 09:56:52 jalet 18 24 # Mailto option now accepts some additional values which all mean that … … 108 114 """Reads and checks the configuration file.""" 109 115 self.filename = os.path.join(directory, "pykota.conf") 116 if not os.path.isfile(self.filename) : 117 raise PyKotaConfigError, _("Configuration file %s not found.") % self.filename 110 118 self.config = ConfigParser.ConfigParser() 111 119 self.config.read([self.filename]) -
pykota/trunk/pykota/tool.py
r852 r872 15 15 # 16 16 # $Log$ 17 # Revision 1.28 2003/03/29 13:08:28 jalet 18 # Configuration is now expected to be found in /etc/pykota.conf instead of 19 # in /etc/cups/pykota.conf 20 # Installation script can move old config files to the new location if needed. 21 # Better error handling if configuration file is absent. 22 # 17 23 # Revision 1.27 2003/03/15 23:01:28 jalet 18 24 # New mailto option in configuration file added. … … 144 150 # pykota specific stuff 145 151 self.documentation = doc 146 self.config = config.PyKotaConfig( os.environ.get("CUPS_SERVERROOT", "/etc/cups"))152 self.config = config.PyKotaConfig("/etc") 147 153 self.logger = logger.openLogger(self.config) 148 154 self.storage = storage.openConnection(self.config, asadmin=(not isfilter)) -
pykota/trunk/setup.py
r870 r872 17 17 # 18 18 # $Log$ 19 # Revision 1.5 2003/03/29 13:08:28 jalet 20 # Configuration is now expected to be found in /etc/pykota.conf instead of 21 # in /etc/cups/pykota.conf 22 # Installation script can move old config files to the new location if needed. 23 # Better error handling if configuration file is absent. 24 # 19 25 # Revision 1.4 2003/03/29 09:47:00 jalet 20 26 # More powerful installation script. … … 81 87 82 88 if "install" in sys.argv : 89 # checks if Python version is correct, we need >= 2.1 83 90 if not (sys.version > "2.1") : 84 91 sys.stderr.write("PyKota needs at least Python v2.1 !\nYour version seems to be older than that, please update.\nAborted !\n") 85 92 sys.exit(-1) 86 93 94 # checks if a configuration file is present in the old location 95 if os.path.isfile("/etc/cups/pykota.conf") : 96 if not os.path.isfile("/etc/pykota.conf") : 97 sys.stdout.write("From version 1.02 on, PyKota expects to find its configuration file in /etc instead of /etc/cups.\n") 98 sys.stdout.write("It seems that you've got a configuration file in the old location, so it will not be used anymore, and no configuration file in the new location.\n") 99 answer = raw_input("Do you want me to move your configuration file to the new location in /etc (y/N) ? ") 100 if answer[0:1].upper() == 'Y' : 101 try : 102 os.rename("/etc/cups/pykota.conf", "/etc/pykota.conf") 103 except OSError : 104 sys.stderr.write("ERROR : An error occured while moving /etc/cups/pykota.conf to /etc/pykota.conf\nAborted !\n") 105 sys.exit(-1) 106 else : 107 sys.stderr.write("WARNING : Configuration file /etc/cups/pykota.conf won't be used ! Move it to /etc instead.\n") 108 sys.stderr.write("PyKota installation will continue anyway, but the software won't run until you put a proper configuration file in /etc\n") 109 else : 110 sys.stderr.write("WARNING : Configuration file /etc/cups/pykota.conf will not be used !\nThe file /etc/pykota.conf will be used instead.\n") 111 112 # checks if some needed Python modules are there or not. 87 113 modulestocheck = [("PygreSQL", "pg"), ("mxDateTime", "mx.DateTime")] 88 114 commandstocheck = [("SNMP Tools", "snmpget")] … … 93 119 sys.exit(-1) 94 120 121 # checks if some software are there or not. 95 122 for (name, command) in commandstocheck : 96 123 action = checkWithPrompt(name, command=command)