Changeset 1809 for pykota/trunk

Show
Ignore:
Timestamp:
10/12/04 17:37:00 (20 years ago)
Author:
jalet
Message:

Now outputs the name of the offending user if a mere mortal tries to use
one of these commands !!!

Location:
pykota/trunk/bin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/dumpykota

    r1803 r1809  
    2424# 
    2525# $Log$ 
     26# Revision 1.15  2004/10/12 15:37:00  jalet 
     27# Now outputs the name of the offending user if a mere mortal tries to use 
     28# one of these commands !!! 
     29# 
    2630# Revision 1.14  2004/10/11 22:53:05  jalet 
    2731# Postponed string interpolation to help message's output method 
     
    167171        """Print Quota Data Dumper.""" 
    168172        if not self.config.isAdmin : 
    169             raise PyKotaToolError, _("You're not allowed to use this command.") 
     173            raise PyKotaToolError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 
    170174             
    171175        datatype = options["data"] 
  • pykota/trunk/bin/edpykota

    r1803 r1809  
    2424# 
    2525# $Log$ 
     26# Revision 1.81  2004/10/12 15:37:00  jalet 
     27# Now outputs the name of the offending user if a mere mortal tries to use 
     28# one of these commands !!! 
     29# 
    2630# Revision 1.80  2004/10/11 22:53:05  jalet 
    2731# Postponed string interpolation to help message's output method 
     
    284288 
    285289import sys 
    286  
     290import os 
     291import pwd 
    287292from pykota.tool import PyKotaTool, PyKotaToolError, crashed, N_ 
    288293from pykota.config import PyKotaConfigError 
     
    468473        """Edit user or group quotas.""" 
    469474        if not self.config.isAdmin : 
    470             raise PyKotaToolError, _("You're not allowed to use this command.") 
     475            raise PyKotaToolError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 
    471476         
    472477        suffix = (options["groups"] and "Group") or "User"