Mon Sep 26 17:45:12 PDT 2005
svn: r5239
This commit is contained in:
@@ -242,9 +242,9 @@ class Checkpoint(Tool.Tool):
|
|||||||
if self.options.handler.options_dict['rcs']:
|
if self.options.handler.options_dict['rcs']:
|
||||||
self.rcs(archive,cli)
|
self.rcs(archive,cli)
|
||||||
elif archive:
|
elif archive:
|
||||||
self.custom(self.options.handler.options_dict['cacmd'],cli)
|
self.custom(self.options.handler.options_dict['cacmd'],True,cli)
|
||||||
else:
|
else:
|
||||||
self.custom(self.options.handler.options_dict['crcmd'],cli)
|
self.custom(self.options.handler.options_dict['crcmd'],False,cli)
|
||||||
|
|
||||||
if not cli:
|
if not cli:
|
||||||
self.parent.progress.set_fraction(0)
|
self.parent.progress.set_fraction(0)
|
||||||
@@ -254,7 +254,7 @@ class Checkpoint(Tool.Tool):
|
|||||||
format = locale.nl_langinfo(locale.D_T_FMT)
|
format = locale.nl_langinfo(locale.D_T_FMT)
|
||||||
return unicode(time.strftime(format,time.localtime(time.time())))
|
return unicode(time.strftime(format,time.localtime(time.time())))
|
||||||
|
|
||||||
def custom(self,cmd,cli):
|
def custom(self,cmd,checkin,cli):
|
||||||
"""
|
"""
|
||||||
Passed the generated XML file to the specified command.
|
Passed the generated XML file to the specified command.
|
||||||
"""
|
"""
|
||||||
@@ -266,23 +266,31 @@ class Checkpoint(Tool.Tool):
|
|||||||
message = "\n".join(proc.childerr.readlines())
|
message = "\n".join(proc.childerr.readlines())
|
||||||
del proc
|
del proc
|
||||||
|
|
||||||
if status:
|
if checkin:
|
||||||
msg1 = _("Checkpoint Failed")
|
if status:
|
||||||
msg2 = _("An attempt to archive the data failed "
|
msg1 = archive_failure_msg[0]
|
||||||
"with the following message:\n\n%s") % message
|
msg2 = archive_failure_msg[1] % message
|
||||||
if cli:
|
dialog = ErrorDialog
|
||||||
print msg1
|
|
||||||
print msg2
|
|
||||||
else:
|
else:
|
||||||
ErrorDialog(msg1,msg2)
|
msg1 = archive_success_msg[0]
|
||||||
|
msg2 = archive_success_msg[1]
|
||||||
|
dialog = OkDialog
|
||||||
else:
|
else:
|
||||||
msg1 = _("Checkpoint Succeeded ")
|
if status:
|
||||||
msg2 = _("The data was successfully archived.")
|
msg1 = retrieve_failure_msg[0]
|
||||||
if cli:
|
msg2 = retrieve_failure_msg[1] % message
|
||||||
print msg1
|
dialog = ErrorDialog
|
||||||
print msg2
|
|
||||||
else:
|
else:
|
||||||
OkDialog(msg1,msg2)
|
msg1 = retrieve_success_msg[0]
|
||||||
|
msg2 = retrieve_success_msg[1]
|
||||||
|
dialog = OkDialog
|
||||||
|
|
||||||
|
if cli:
|
||||||
|
print msg1
|
||||||
|
print msg2
|
||||||
|
else:
|
||||||
|
dialog(msg1,msg2)
|
||||||
|
|
||||||
|
|
||||||
def rcs(self,checkin,cli):
|
def rcs(self,checkin,cli):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user