mirror of
https://github.com/arsenetar/send2trash.git
synced 2024-10-31 22:05:58 +00:00
Replace == None with is None
This commit is contained in:
parent
8001be8f37
commit
18e3187c2f
@ -48,7 +48,7 @@ def format_date(date):
|
|||||||
def info_for(src, topdir):
|
def info_for(src, topdir):
|
||||||
# ...it MUST not include a ".."" directory, and for files not "under" that
|
# ...it MUST not include a ".."" directory, and for files not "under" that
|
||||||
# directory, absolute pathnames must be used. [2]
|
# directory, absolute pathnames must be used. [2]
|
||||||
if topdir == None or not is_parent(topdir, src):
|
if topdir is None or not is_parent(topdir, src):
|
||||||
src = op.abspath(src)
|
src = op.abspath(src)
|
||||||
else:
|
else:
|
||||||
src = op.relpath(src, topdir)
|
src = op.relpath(src, topdir)
|
||||||
@ -120,7 +120,7 @@ def find_ext_volume_fallback_trash(volume_root):
|
|||||||
|
|
||||||
def find_ext_volume_trash(volume_root):
|
def find_ext_volume_trash(volume_root):
|
||||||
trash_dir = find_ext_volume_global_trash(volume_root)
|
trash_dir = find_ext_volume_global_trash(volume_root)
|
||||||
if trash_dir == None:
|
if trash_dir is None:
|
||||||
trash_dir = find_ext_volume_fallback_trash(volume_root)
|
trash_dir = find_ext_volume_fallback_trash(volume_root)
|
||||||
return trash_dir
|
return trash_dir
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user