diff --git a/mrepo.py b/mrepo.py index ed14b11..9410cc3 100755 --- a/mrepo.py +++ b/mrepo.py @@ -404,7 +404,7 @@ def genmetadata(self): if not repo.lock('generate'): continue - _call_hook('pre-generate') + self.call_hook('pre-generate') self.linksync(repo, [repo.srcdir]) @@ -415,7 +415,7 @@ def genmetadata(self): repo.writesha1() repo.unlock('generate') - _call_hook('post-generate') + self.call_hook('post-generate') def linksync(self, repo, srcdirs=None): if not srcdirs: @@ -505,7 +505,7 @@ def mirror(self): "Check URL and pass on to mirror-functions." global EXITCODE - _call_hook('pre-update') + self.call_hook('pre-update') ### Make a snapshot of the directory self.oldlist = self.rpmlist() @@ -536,7 +536,7 @@ def mirror(self): ### Make a snapshot of the directory self.newlist = self.rpmlist() - _call_hook('post-update') + self.call_hook('post-update') def rpmlist(self): "Capture a list of packages in the repository" @@ -596,7 +596,7 @@ def lock(self, action): if OPTIONS.dryrun: return True - _call_hook('lock') + self.call_hook('lock') lockfile = path_join(CONFIG.lockdir, self.dist.nick, action + '-' + self.name + '.lock') mkdir(os.path.dirname(lockfile)) @@ -628,7 +628,7 @@ def unlock(self, action): if OPTIONS.dryrun: return - _call_hook('unlock') + self.call_hook('unlock') lockfile = path_join(CONFIG.lockdir, self.dist.nick, action + '-' + self.name + '.lock') info(6, '%s: Removing lock %s' % (self.dist.nick, lockfile))