Changeset 1495 for pykota/trunk/pykota/config.py
- Timestamp:
- 05/25/04 00:45:49 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/config.py
r1483 r1495 22 22 # 23 23 # $Log$ 24 # Revision 1.48 2004/05/24 22:45:49 jalet 25 # New 'enforcement' directive added 26 # Polling loop improvements 27 # 24 28 # Revision 1.47 2004/05/18 14:49:20 jalet 25 29 # Big code changes to completely remove the need for "requester" directives, … … 343 347 return # No command to launch in the post-hook 344 348 349 def getPrinterEnforcement(self, printername) : 350 """Returns if quota enforcement should be strict or laxist for the current printer.""" 351 validenforcements = [ "STRICT", "LAXIST" ] 352 try : 353 enforcement = self.getPrinterOption(printername, "enforcement") 354 except PyKotaConfigError : 355 return "LAXIST" 356 else : 357 enforcement = enforcement.upper() 358 if enforcement not in validenforcements : 359 raise PyKotaConfigError, _("Option enforcement in section %s only supports values in %s") % (printername, str(validenforcements)) 360 return enforcement 361 345 362 def getPrinterPolicy(self, printername) : 346 363 """Returns the default policy for the current printer."""