Changeset 3552

Show
Ignore:
Timestamp:
11/08/10 22:10:24 (10 years ago)
Author:
jerome
Message:

Fixes a strange case where the job's originating user name is not found
in the CUPS' job ticket.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/cups.py

    r3547 r3552  
    8383        # Only does this if there's a "@" in the username, otherwise we could break non-kerberized 
    8484        # usernames containing a "/", like Samba/Windows usernames in some cases. 
    85         if self.OriginatingUserName.find("@") != -1 : 
    86             self.OriginatingUserName = self.OriginatingUserName.split("@", 1)[0].split("/")[0] 
     85        try : 
     86            if self.OriginatingUserName.find("@") != -1 : 
     87                self.OriginatingUserName = self.OriginatingUserName.split("@", 1)[0].split("/")[0] 
     88        except AttributeError : # None 
     89            pass 
    8790 
    8891        # The options weren't retrieved from the job ticket but from the