# 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
"""
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
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')
# 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)
return len
# Close file
+ # NOT YET IMPLEMENTED
def close(self):
self.fd.close()