Changeset 2344 for pykota/trunk/pykota
- Timestamp:
- 07/08/05 18:52:50 (19 years ago)
- Location:
- pykota/trunk/pykota
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r2307 r2344 40 40 from mx import DateTime 41 41 42 from pykota import version, config, storage, logger, accounter, pdlanalyzer 42 from pykota import config, storage, logger, accounter, pdlanalyzer 43 from pykota.version import __version__, __author__, __years__, __gplblurb__ 43 44 44 45 def N_(message) : … … 61 62 for line in traceback.format_exception(*sys.exc_info()) : 62 63 lines.extend([l for l in line.split("\n") if l]) 63 msg = "ERROR: ".join(["%s\n" % l for l in (["ERROR: PyKota v%s" % version.__version__, message] + lines)])64 msg = "ERROR: ".join(["%s\n" % l for l in (["ERROR: PyKota v%s" % __version__, message] + lines)]) 64 65 sys.stderr.write(msg) 65 66 sys.stderr.flush() … … 68 69 class Tool : 69 70 """Base class for tools with no database access.""" 70 def __init__(self, lang="", charset=None, doc="PyKota v% s (c) %s %s" % (version.__version__, version.__copyright__, version.__author__)) :71 def __init__(self, lang="", charset=None, doc="PyKota v%(__version__)s (c) %(__years__)s %(__author__)s") : 71 72 """Initializes the command line tool.""" 72 73 # did we drop priviledges ? … … 206 207 except AttributeError : 207 208 pass 208 print version.__version__209 print __version__ 209 210 sys.exit(0) 210 211 … … 215 216 except AttributeError : 216 217 pass 217 print _(self.documentation) % (version.__version__, version.__copyright__, version.__author__, version.__author__) 218 print _(self.documentation) % globals() 219 print __gplblurb__ 220 print 221 print _("Please report bugs to :"), __author__ 218 222 sys.exit(0) 219 223 … … 232 236 server.sendmail(admin, [admin, crashrecipient], \ 233 237 "From: %s\nTo: %s\nCc: %s\nSubject: PyKota v%s crash traceback !\n\n%s" % \ 234 (admin, crashrecipient, admin, version.__version__, fullmessage))238 (admin, crashrecipient, admin, __version__, fullmessage)) 235 239 server.quit() 236 240 except : … … 299 303 class PyKotaTool(Tool) : 300 304 """Base class for all PyKota command line tools.""" 301 def __init__(self, lang="", charset=None, doc="PyKota %s (c) 2003-2004 %s" % (version.__version__, version.__author__)) :305 def __init__(self, lang="", charset=None, doc="PyKota v%(__version__)s (c) %(__years__)s %(__author__)s") : 302 306 """Initializes the command line tool and opens the database.""" 303 307 Tool.__init__(self, lang, charset, doc) -
pykota/trunk/pykota/version.py
r2342 r2344 22 22 # 23 23 24 __version__ = "1.23alpha1 5_unofficial"24 __version__ = "1.23alpha16_unofficial" 25 25 26 26 __doc__ = "PyKota : a complete Printing Quota Solution for CUPS and LPRng." … … 28 28 __author__ = "Jerome Alet - alet@librelogiciel.com" 29 29 30 __copyright__ = "2003, 2004, 2005" 30 __years__ = "2003, 2004, 2005" 31 32 __gplblurb__ = """This program is free software; you can redistribute it and/or modify 33 it under the terms of the GNU General Public License as published by 34 the Free Software Foundation; either version 2 of the License, or 35 (at your option) any later version. 36 37 This program is distributed in the hope that it will be useful, 38 but WITHOUT ANY WARRANTY; without even the implied warranty of 39 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 40 GNU General Public License for more details. 41 42 You should have received a copy of the GNU General Public License 43 along with this program; if not, write to the Free Software 44 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA."""