Changeset View
Changeset View
Standalone View
Standalone View
wallace/module_gpgencrypt.py
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | def execute(*args, **kw): | ||||
if not os.path.isdir(mybasepath): | if not os.path.isdir(mybasepath): | ||||
os.makedirs(mybasepath) | os.makedirs(mybasepath) | ||||
for stage in ['incoming', 'ACCEPT' ]: | for stage in ['incoming', 'ACCEPT' ]: | ||||
if not os.path.isdir(os.path.join(mybasepath, stage)): | if not os.path.isdir(os.path.join(mybasepath, stage)): | ||||
os.makedirs(os.path.join(mybasepath, stage)) | os.makedirs(os.path.join(mybasepath, stage)) | ||||
if kw.has_key('stage'): | if 'stage' in kw: | ||||
log.debug(_("Issuing callback after processing to stage %s") % (kw['stage']), level=8) | log.debug(_("Issuing callback after processing to stage %s") % (kw['stage']), level=8) | ||||
log.debug(_("Testing cb_action_%s()") % (kw['stage']), level=8) | log.debug(_("Testing cb_action_%s()") % (kw['stage']), level=8) | ||||
if hasattr(modules, 'cb_action_%s' % (kw['stage'])): | if hasattr(modules, 'cb_action_%s' % (kw['stage'])): | ||||
log.debug(_("Attempting to execute cb_action_%s()") % (kw['stage']), level=8) | log.debug(_("Attempting to execute cb_action_%s()") % (kw['stage']), level=8) | ||||
exec('modules.cb_action_%s(%r, %r)' % (kw['stage'],'gpgencrypt',filepath)) | exec('modules.cb_action_%s(%r, %r)' % (kw['stage'],'gpgencrypt',filepath)) | ||||
log.debug(_("Executing module gpgencrypt for %r, %r") % (args, kw), level=8) | log.debug(_("Executing module gpgencrypt for %r, %r") % (args, kw), level=8) | ||||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |