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

Docker: Update default.py to fix Python BPO - syntax warning for "is" with a literal #4573

Merged
merged 1 commit into from
Oct 30, 2020

Conversation

heitbaum
Copy link
Contributor

@heitbaum heitbaum commented Oct 3, 2020

Docker: Update default.py to fix Python BPO - syntax warning for "is" with a literal

Error in Kodi nightly 1002. This is the fix.
default.py:188: SyntaxWarning: "is" with a literal. Did you mean "=="?
if addon.getSetting('notifications') is '0': # default
default.py:203: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif addon.getSetting('notifications') is '1': # all
default.py:217: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif addon.getSetting('notifications') is '2': # none
default.py:220: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif addon.getSetting('notifications') is '3': # custom
default.py:237: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if message is not '':

Had raised as kodi bug: xbmc/xbmc#18501

Python BPO that introduced the behaviour https://bugs.python.org/issue34850

@mglae
Copy link
Contributor

mglae commented Oct 3, 2020

Please add "Docker: " to commit message and PR title.

@heitbaum heitbaum changed the title Update default.py Docker: Update default.py to fix Python BPO - syntax warning for "is" with a literal Oct 3, 2020
@mglae
Copy link
Contributor

mglae commented Oct 4, 2020

Thanks, but I did forget the administrative part.

Please increase PKG_REV in package.mk and update changelog.txt. For including #4557 please add a line like Fix "docker run --init".

@heitbaum
Copy link
Contributor Author

heitbaum commented Oct 5, 2020

Hi @mglae think I covered all required now. Thanks for the help.

@mglae
Copy link
Contributor

mglae commented Oct 5, 2020

You may consider to log your own change too.

Copy link
Contributor Author

@heitbaum heitbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed update and review based on feedback. Code change and supporting files matched.

@heitbaum
Copy link
Contributor Author

heitbaum commented Oct 6, 2020

Fix "docker run --init".
Fixes #4541

@heitbaum heitbaum changed the title Docker: Update default.py to fix Python BPO - syntax warning for "is" with a literal Docker: Update default.py to fix Python BPO - syntax warning for "is" with a literal Fixes #4557 Oct 6, 2020
@heitbaum heitbaum changed the title Docker: Update default.py to fix Python BPO - syntax warning for "is" with a literal Fixes #4557 Docker: Update default.py to fix Python BPO - syntax warning for "is" with a literal Oct 6, 2020
@heitbaum
Copy link
Contributor Author

heitbaum commented Oct 9, 2020

You may consider to log your own change too.

Hi @mglae - do I need to perform any other steps to complete the pull? I can’t see where to actually create the change record?

@chewitt
Copy link
Member

chewitt commented Oct 10, 2020

Please squash changes to a single commit and update the commit messsage (not the PR title) to follow house style, e.g.

docker: update default.py to fix Python BPO - syntax warning for "is" with a literal

@heitbaum
Copy link
Contributor Author

All done ready for commit now :-) @chewitt - was definitely a learning exercise on squashing as a single commit. Was good to learn something new in the lockdown.

@mglae mglae merged commit cf5a710 into LibreELEC:master Oct 30, 2020
@heitbaum heitbaum deleted the patch-1 branch October 31, 2020 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants