equal
deleted
inserted
replaced
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) |