Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #set all the defaults first
- DBName = "mythconverg"
- DBUserName = "mythtv"
- DBPassword = "mythtv"
- #list of arguments that can be passed:
- acceptedArgs = ['--DBName','--DBUserName']
- #pretend these are our arguments for now
- myargs = ['--DBName="newName"','--DBUserName="newUser"','--DBPassword="newPassword"']
- for arg in myargs:
- if arg.split['='][0] in acceptedArgs:
- #assign new value here
- else
- #this is an unacceptable argument, raise an exception
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement