server/sqlutils.py
changeset 4899 c666d265fb95
parent 4849 3827b9ee77ac
parent 4893 15ae9a33a7f2
child 4913 083b4d454192
equal deleted inserted replaced
4897:e402e0b32075 4899:c666d265fb95
   157 
   157 
   158     def get_connection(self):
   158     def get_connection(self):
   159         """open and return a connection to the database"""
   159         """open and return a connection to the database"""
   160         return self.dbhelper.get_connection()
   160         return self.dbhelper.get_connection()
   161 
   161 
   162     def backup_to_file(self, backupfile):
   162     def backup_to_file(self, backupfile, confirm):
   163         for cmd in self.dbhelper.backup_commands(backupfile,
   163         for cmd in self.dbhelper.backup_commands(backupfile,
   164                                                  keepownership=False):
   164                                                  keepownership=False):
   165             if _run_command(cmd):
   165             if _run_command(cmd):
   166                 if not confirm('   [Failed] Continue anyway?', default='n'):
   166                 if not confirm('   [Failed] Continue anyway?', default='n'):
   167                     raise Exception('Failed command: %s' % cmd)
   167                     raise Exception('Failed command: %s' % cmd)