gp: Fix NameError: free variable 'cron_dir' in Crontab CSE
authorDavid Mulder <dmulder@samba.org>
Tue, 18 Apr 2023 19:34:46 +0000 (13:34 -0600)
committerDavid Mulder <dmulder@samba.org>
Wed, 19 Apr 2023 21:21:10 +0000 (21:21 +0000)
commit6e525d55d98568ac6f0f89b78de5a4cebedb0dc2
tree175bbd7fee28e5807a33b27161dc786911370139
parentaf91bcb35934b04d84d097103d92c0420e65d6b9
gp: Fix NameError: free variable 'cron_dir' in Crontab CSE

An apply reports the error "NameError: free
variable 'cron_dir' referenced before assignment
in enclosing scope". This only happens when no
policy is defined for this CSE, because existing
policy causes the variable to be defined.

Moved the 'cron_dir' varilable to the correct
scope.

Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): David Mulder <dmulder@samba.org>
Autobuild-Date(master): Wed Apr 19 21:21:10 UTC 2023 on atb-devel-224
python/samba/gp/gp_centrify_crontab_ext.py