Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. root@dangerzone:~# chcat -l -- +SystemLow,+SystemHigh john
  2. /usr/bin/chcat: Requires at least one category
  3. root@dangerzone:~#
  4.  
  5. def chcat_add(orig, newcat, objects,login_ind):
  6. if len(newcat) == 1:
  7. aise ValueError(_("Requires at least one category"))
  8.  
  9. cats = cmds[0].split(",")
  10. mod_ind = 0
  11. errors = 0
  12. objects = cmds[1:]
  13. try:
  14. if check_replace(cats):
  15. errors = chcat_replace(translate(cats), objects, login_ind)
  16. else:
  17. for c in cats:
  18. l = []
  19. l.append(c[1:])
  20. if len(c) > 0 and c[0] == "+":
  21. errors += chcat_add(c[1:],translate(l), objects, login_ind)
  22. continue
  23. [...]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement