Changeset 3169 for pykota/trunk/bin

Show
Ignore:
Timestamp:
04/17/07 19:41:37 (18 years ago)
Author:
jerome
Message:

Finish implementation of the usernamecase directive.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r3159 r3169  
    391391            self.UserName = self.UserName.split(separator)[-1] 
    392392             
    393         # do we want to lowercase usernames ?     
    394         if self.config.getUserNameToLower() : 
    395             self.UserName = self.UserName.lower() 
     393        # this option is deprecated, and we want to tell people     
     394        # this is the case. 
     395        dummy = self.config.getUserNameToLower() 
     396        if dummy is not None : 
     397            self.printInfo("Option 'utolower' is deprecated. Please use the 'usernamecase' option instead. Syntax is 'usernamecase: lower|upper|native' and defaults to 'native'.", "error") 
     398        # Now use the newer and more complete 'usernamecase' directive.     
     399        casechange = self.config.getUserNameCase()     
     400        if casechange != "native" : 
     401            self.UserName = getattr(self.UserName, casechange)() 
    396402             
    397403        # do we want to strip some prefix off of titles ?