Changeset 3367 for pykota/trunk/pykota/utils.py
- Timestamp:
- 05/03/08 18:58:06 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/utils.py
r3366 r3367 31 31 from pykota.errors import PyKotaCommandLineError 32 32 33 def onlyAdmin(app, restricted=True) :34 """Raises an exception if the user is not a PyKota administrator."""35 if restricted and not app.config.isAdmin :36 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command."))37 38 33 def initlocale(lang="", cset=None) : 39 34 """Initializes the locale stuff."""