Changeset 3367 for pykota/trunk/pykota/tool.py
- Timestamp:
- 05/03/08 18:58:06 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r3327 r3367 171 171 sys.stderr.flush() 172 172 173 def adminOnly(self, restricted=True) : 174 """Raises an exception if the user is not a PyKota administrator.""" 175 if restricted and not self.config.isAdmin : 176 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 177 173 178 def matchString(self, s, patterns) : 174 179 """Returns True if the string s matches one of the patterns, else False."""