Changeset 859 for pykota

Show
Ignore:
Timestamp:
03/22/03 14:11:33 (22 years ago)
Author:
jalet
Message:

The port on which the Quota Storage Sever is listening can now
be set in the configuration file (see sample).
Better error handling if PygreSQL is not installed.
Improved documentation.
Version number changed to 1.02alpha

Location:
pykota/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/conf/pykota.conf.sample

    r853 r859  
    2323# Ldap, MySQL, Berkeley are planned 
    2424storagebackend: postgresql 
     25 
     26# Quota Storage Server hostname (and port) 
     27# e.g. db.mydomain.com:5432 
    2528storageserver: localhost 
     29 
     30# 
     31# name of the Quota Storage Database 
    2632storagename: pykota 
     33 
     34# Quota Storage administrator's and normal user's names and passwords 
    2735storageadmin: pykotaadmin 
    2836storageuser: pykotauser 
  • pykota/trunk/docs/installation.sgml

    r858 r859  
    2020   
    2121  <para> 
    22     Now we will see what has to be done on all those servers. 
     22    Now we will see what has to be done on these servers. 
    2323    <note> 
    2424      <title>Note</title> 
     
    9292          <para> 
    9393            The TCP/IP network port used by PostgreSQL may be different. When in doubt, ask your  
    94             <glossaryterm>System Administrator</glossaryterm> for the correct value. Actually 
    95             <application>PyKota</application> does not work if the port used is not the default one, 
    96             but this limitation will be removed in a future version. 
     94            <glossaryterm>System Administrator</glossaryterm> for the correct value.  
    9795          </para> 
    9896        </tip>   
     
    154152 
    155153$Log$ 
     154Revision 1.5  2003/03/22 13:11:33  jalet 
     155The port on which the Quota Storage Sever is listening can now 
     156be set in the configuration file (see sample). 
     157Better error handling if PygreSQL is not installed. 
     158Improved documentation. 
     159Version number changed to 1.02alpha 
     160 
    156161Revision 1.4  2003/03/22 07:20:38  jalet 
    157162More information wrt PostgreSQL tcp/ip configuration. 
  • pykota/trunk/NEWS

    r855 r859  
    1616PyKota NEWS : 
    1717 
     18    - 1.02alpha : 
     19     
     20        - Improved documentation. 
     21         
     22        - You can now set the tcp/ip port on which the Quota Storage 
     23          Server is listening, see sample configuration file for details. 
     24         
     25        - Better error handling if PygreSQL is not installed or not  
     26          available. 
     27         
    1828    - 1.01 : 
    1929     
  • pykota/trunk/pykota/storages/postgresql.py

    r800 r859  
    1515# 
    1616# $Log$ 
     17# Revision 1.5  2003/03/22 13:11:33  jalet 
     18# The port on which the Quota Storage Sever is listening can now 
     19# be set in the configuration file (see sample). 
     20# Better error handling if PygreSQL is not installed. 
     21# Improved documentation. 
     22# Version number changed to 1.02alpha 
     23# 
    1724# Revision 1.4  2003/02/17 22:05:50  jalet 
    1825# Storage backend now supports admin and user passwords (untested) 
     
    3037# 
    3138 
    32 import pg 
     39try : 
     40    import pg 
     41except ImportError :     
     42    import sys 
     43    sys.stderr.write("This python version (%s) doesn't seem to have the PygreSQL module installed correctly.\n" % sys.version.split()[0]) 
     44    raise 
    3345 
    3446from pykota.storage import PyKotaStorageError 
     
    4052        self.closed = 1 
    4153        try : 
    42             self.database = pg.connect(host=host, dbname=dbname, user=user, passwd=passwd) 
     54            (host, port) = host.split(":") 
     55            port = int(port) 
     56        except ValueError :     
     57            port = -1         # Use PostgreSQL's default tcp/ip port (5432). 
     58         
     59        try : 
     60            self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 
    4361            self.closed = 0 
    4462        except pg.error, msg : 
  • pykota/trunk/pykota/version.py

    r850 r859  
    1515# 
    1616 
    17 __version__ = "1.01-unofficial" 
     17__version__ = "1.02alpha-unofficial" 
    1818 
    1919__doc__ = """PyKota : a complete Printing Quota Solution for CUPS.""" 
  • pykota/trunk/README

    r851 r859  
    9292network printer capable of outputing its lifetime printed pages  
    9393number. 
     94 
     95If your printers don't support SNMP, then making them work with  
     96PyKota is up to you. Some sample scripts which can query non-SNMP  
     97printers for their lifetime page counter are included in the  
     98./untested directory. You'll have to test and adapt them though, and  
     99define them as external requesters in the PyKota configuration file.  
    94100 
    95101============================================================ 
     
    213219           You should ensure that only the print quota administrator 
    214220           can run the edpykota command, but this is actually not 
    215            enforced in the program. Any user could modify his/her 
    216            or other people's print quota. 
     221           enforced in the program. Otherwise, any user could modify  
     222           his/her or other people's print quota. 
    217223           
    218224           launching : chmod 750 /usr/bin/warnpykota /usr/bin/edpykota