Fix some SyntaxWarnings

* On Python 3.8.5 during normal execution the following is logged:
  SyntaxWarning: "is" with a literal. Did you mean "=="?
This commit is contained in:
Ferenc- 2020-11-02 18:03:13 +01:00
parent f9a9a269b0
commit 1e058b3c79

View file

@ -945,7 +945,7 @@ class CourseraOnDemand(object):
def _add_asset(name, url, destination):
filename, extension = os.path.splitext(clean_url(name))
if extension is '':
if extension == '':
return
extension = clean_filename(
@ -1590,7 +1590,7 @@ class CourseraOnDemand(object):
filename, extension = os.path.splitext(clean_url(link))
# Some courses put links to sites in supplement section, e.g.:
# http://pandas.pydata.org/
if extension is '':
if extension == '':
continue
# Make lowercase and cut the leading/trailing dot