Changeset 1612 for trunk/packages/invirt-web
- Timestamp:
- Nov 11, 2008, 3:50:12 AM (16 years ago)
- Location:
- trunk/packages/invirt-web/code
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-web/code/controls.py
r1318 r1612 4 4 5 5 import validation 6 from webcommon import CodeError, InvalidInput6 from invirt.common import CodeError, InvalidInput 7 7 import random 8 8 import subprocess -
trunk/packages/invirt-web/code/main.py
r1578 r1612 37 37 import validation 38 38 import cache_acls 39 from webcommon import InvalidInput, CodeError,State39 from webcommon import State 40 40 import controls 41 41 from getafsgroups import getAfsGroupMembers … … 43 43 from invirt.database import Machine, CDROM, session, connect, MachineAccess, Type, Autoinstall 44 44 from invirt.config import structs as config 45 from invirt.common import InvalidInput, CodeError 45 46 46 47 def pathSplit(path): -
trunk/packages/invirt-web/code/validation.py
r1542 r1612 8 8 from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall 9 9 from invirt.config import structs as config 10 from webcommon import InvalidInput10 from invirt.common import InvalidInput 11 11 12 12 MAX_MEMORY_TOTAL = 512 -
trunk/packages/invirt-web/code/webcommon.py
r1318 r1612 4 4 from invirt import database 5 5 from invirt.database import Machine, MachineAccess 6 7 class MyException(Exception):8 """Base class for my exceptions"""9 pass10 11 class InvalidInput(MyException):12 """Exception for user-provided input is invalid but maybe in good faith.13 14 This would include setting memory to negative (which might be a15 typo) but not setting an invalid boot CD (which requires bypassing16 the select box).17 """18 def __init__(self, err_field, err_value, expl=None):19 MyException.__init__(self, expl)20 self.err_field = err_field21 self.err_value = err_value22 23 class CodeError(MyException):24 """Exception for internal errors or bad faith input."""25 pass26 6 27 7 import controls
Note: See TracChangeset
for help on using the changeset viewer.