tools/image-info: fix warning when running with python 3.8
Python 3.8 introduced this warning: tools/image-info:53: SyntaxWarning: "is" with a literal. Did you mean "=="? if line[0] is '#': This commit fixes this warning. More info in Python 3.8 release notes: https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior
This commit is contained in:
parent
3b5d5a73d3
commit
4c93d5a045
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ def parse_environment_vars(s):
|
|||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
if line[0] is '#':
|
||||
if line[0] == '#':
|
||||
continue
|
||||
key, value = line.split("=", 1)
|
||||
r[key] = value.strip('"')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue