Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized local variable 'clean' in plugins/command/deploy.py produces a warning upon deployment #3502

Closed
mkkhg opened this issue Jan 13, 2021 · 2 comments

Comments

@mkkhg
Copy link

mkkhg commented Jan 13, 2021

Environment

Python Version:
3.8.5

Nikola Version:
v8.1.2

Operating System:
Ubuntu 20 LTS, WSL 2

Description:

A small bug - local variable 'clean' in plugins/command/deploy.py is not initialized explicitly, thus produces a warning upon deployment:

[2021-01-13 19:40:14] INFO: deploy: => preset 'default'
[2021-01-13 19:40:14] INFO: deploy: ==> rsync ...
sending incremental file list

sent 3,180 bytes received 27 bytes 1,282.80 bytes/sec
total size is 5,102,325 speedup is 1,590.00
[2021-01-13 19:40:16] INFO: deploy: Successful deployment
Traceback (most recent call last):
File "/home/s/nikola/lib/python3.8/site-packages/doit/doit_cmd.py", line 190, in run
return command.parse_execute(args)
File "/home/s/nikola/lib/python3.8/site-packages/doit/cmd_base.py", line 150, in parse_execute
return self.execute(params, args)
File "/home/s/nikola/lib/python3.8/site-packages/nikola/plugin_categories.py", line 145, in execute
return self._execute(options, args)
File "/home/s/nikola/lib/python3.8/site-packages/nikola/plugins/command/deploy.py", line 99, in _execute
self._emit_deploy_event(last_deploy, new_deploy, clean, undeployed_posts)
UnboundLocalError: local variable 'clean' referenced before assignment

@Kwpolska
Copy link
Member

Duplicate of #3500 and #3479. Please search existing issues before creating a new one.

@mkkhg
Copy link
Author

mkkhg commented Jan 13, 2021

Thanks. I'm not familiar with Github, so missed the fact that the bug may be closed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants