Changeset 800 for pykota/trunk/pykota/storage.py
- Timestamp:
- 02/17/03 23:06:07 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storage.py
r791 r800 15 15 # 16 16 # $Log$ 17 # Revision 1.8 2003/02/17 22:05:50 jalet 18 # Storage backend now supports admin and user passwords (untested) 19 # 17 20 # Revision 1.7 2003/02/10 12:07:31 jalet 18 21 # Now repykota should output the recorded total page number for each printer too. … … 109 112 """Returns a connection handle to the appropriate Quota Storage Database.""" 110 113 (backend, host, database, admin, user) = config.getStorageBackend() 114 backendinfo = config.getStorageBackend() 115 backend = backendinfo["storagebackend"] 111 116 try : 112 117 if not backend.isalpha() : … … 117 122 raise PyKotaStorageError, _("Unsupported quota storage backend %s") % backend 118 123 else : 119 return getattr(storagebackend, "Storage")(host, database, (asadmin and admin) or user) 124 host = backendinfo["storageserver"] 125 database = backendinfo["storagename"] 126 admin = backendinfo["storageadmin"] 127 user = backendinfo["storageuser"] 128 adminpw = backendinfo["storageadminpw"] 129 userpw = backendinfo["storageuserpw"] 130 if asadmin : 131 return getattr(storagebackend, "Storage")(host, database, admin, adminpw) 132 else : 133 return getattr(storagebackend, "Storage")(host, database, user, userpw) 120 134