]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/examples/python/DirStartUp.py
Fix #1648 about make_catalog_backup.pl with multiple catalog
[bacula/bacula] / bacula / examples / python / DirStartUp.py
index 00cedc1b05ea9eed9c3c981cb040b27cb329573a..a6f39956007980a710c1a980e1fabddb2c3ff654 100644 (file)
@@ -7,7 +7,7 @@ import sys, bacula
 
 # This is the list of Bacula daemon events that you
 #  can receive.
-class BaculaEvents:
+class BaculaEvents(object):
   def __init__(self):
      # Called here when a new Bacula Events class is
      #  is created. Normally not used 
@@ -43,7 +43,7 @@ bacula.set_events(BaculaEvents()) # register daemon events desired
 """
   There are the Job events that you can receive.
 """
-class JobEvents:
+class JobEvents(object):
   def __init__(self):
      # Called here when you instantiate the Job. Not
      # normally used
@@ -72,12 +72,15 @@ class JobEvents:
      job.JobReport="Python after New Volume set for Job.\n"  
      return 1
 
+  def VolumePurged(self, job):
+     noop = 1
 
   # Pass output back to Bacula
   def write(self, text):
      self.job.write(text)
 
   # Open file to be backed up. file is the filename
+  #  NOT YET IMPLEMENTED
   def open(self, file):
      print "Open %s called" % file
      self.fd = open('m.py', 'rb')
@@ -86,6 +89,7 @@ class JobEvents:
 
   # Read file data into Bacula memory buffer (mem)
   #  return length read. 0 => EOF, -1 => error
+  #  NOT YET IMPLEMENTED
   def read(self, mem):
      print "Read called\n"
      len = self.fd.readinto(mem)
@@ -93,5 +97,6 @@ class JobEvents:
      return len
 
   # Close file
+  #  NOT YET IMPLEMENTED
   def close(self):
      self.fd.close()