mirror of
https://github.com/coursera-dl/coursera-dl.git
synced 2026-07-18 00:45:26 +00:00
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:
parent
f9a9a269b0
commit
1e058b3c79
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue