]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/examples/python/FDStartUp.py
Fix #1648 about make_catalog_backup.pl with multiple catalog
[bacula/bacula] / bacula / examples / python / FDStartUp.py
index d553f2cd9e511575bda1ce2498e0c0cb7d29156c..4d53e33bfc987463154dc79803fb72d6aea8673f 100644 (file)
@@ -6,7 +6,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 
@@ -20,7 +20,7 @@ class BaculaEvents:
      """
      events = JobEvents()         # create instance of Job class
      events.job = job             # save Bacula's job pointer
-     job.set_events = events      # register events desired
+     job.set_events(events)       # register events desired
      sys.stderr = events          # send error output to Bacula
      sys.stdout = events          # send stdout to Bacula
      jobid = job.JobId
@@ -33,7 +33,7 @@ class BaculaEvents:
      jobid = job.JobId
      client = job.Client 
      job.JobReport="Python FD JobEnd output: JobId=%d Client=%s.\n" % (jobid, client)
-     return 1
+     
 
   # Called here when the Bacula daemon is going to exit
   def Exit(self):
@@ -44,7 +44,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