comparison roundup-admin @ 472:e18210e77a39

actually handle the advertised <cr> response to "commit y/N?"
author Richard Jones <richard@users.sourceforge.net>
date Mon, 31 Dec 2001 05:12:52 +0000
parents f51b017eff05
children ef06a66a0b72
comparison
equal deleted inserted replaced
471:f51b017eff05 472:e18210e77a39
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: roundup-admin,v 1.57 2001-12-31 05:12:01 richard Exp $ 19 # $Id: roundup-admin,v 1.58 2001-12-31 05:12:52 richard Exp $
20 20
21 # python version check 21 # python version check
22 from roundup import version_check 22 from roundup import version_check
23 23
24 import sys, os, getpass, getopt, re, UserDict, shlex 24 import sys, os, getpass, getopt, re, UserDict, shlex
965 self.run_command(args) 965 self.run_command(args)
966 966
967 # exit.. check for transactions 967 # exit.. check for transactions
968 if self.db and self.db.transactions: 968 if self.db and self.db.transactions:
969 commit = raw_input("There are unsaved changes. Commit them (y/N)? ") 969 commit = raw_input("There are unsaved changes. Commit them (y/N)? ")
970 if commit[0].lower() == 'y': 970 if commit and commit[0].lower() == 'y':
971 self.db.commit() 971 self.db.commit()
972 return 0 972 return 0
973 973
974 def main(self): 974 def main(self):
975 try: 975 try:
1010 tool = AdminTool() 1010 tool = AdminTool()
1011 sys.exit(tool.main()) 1011 sys.exit(tool.main())
1012 1012
1013 # 1013 #
1014 # $Log: not supported by cvs2svn $ 1014 # $Log: not supported by cvs2svn $
1015 # Revision 1.57 2001/12/31 05:12:01 richard
1016 # added some quoting instructions to roundup-admin
1017 #
1015 # Revision 1.56 2001/12/31 05:09:20 richard 1018 # Revision 1.56 2001/12/31 05:09:20 richard
1016 # Added better tokenising to roundup-admin - handles spaces and stuff. Can 1019 # Added better tokenising to roundup-admin - handles spaces and stuff. Can
1017 # use quoting or backslashes. See the roundup.token pydoc. 1020 # use quoting or backslashes. See the roundup.token pydoc.
1018 # 1021 #
1019 # Revision 1.55 2001/12/17 03:52:47 richard 1022 # Revision 1.55 2001/12/17 03:52:47 richard

Roundup Issue Tracker: http://roundup-tracker.org/