mirror of
https://github.com/arsenetar/send2trash.git
synced 2025-05-08 01:39:51 +00:00
Merge pull request #53 from BoboTiG/fix-resource-warning
Fix ResourceWarning: unclosed file in setup.py
This commit is contained in:
commit
ec73b44c43
@ -112,9 +112,8 @@ def trash_move(src, dst, topdir=None):
|
|||||||
check_create(infopath)
|
check_create(infopath)
|
||||||
|
|
||||||
os.rename(src, op.join(filespath, destname))
|
os.rename(src, op.join(filespath, destname))
|
||||||
f = open(op.join(infopath, destname + INFO_SUFFIX), "w")
|
with open(op.join(infopath, destname + INFO_SUFFIX), "w") as f:
|
||||||
f.write(info_for(src, topdir))
|
f.write(info_for(src, topdir))
|
||||||
f.close()
|
|
||||||
|
|
||||||
|
|
||||||
def find_mount_point(path):
|
def find_mount_point(path):
|
||||||
|
5
setup.py
5
setup.py
@ -17,9 +17,8 @@ CLASSIFIERS = [
|
|||||||
"Topic :: Desktop Environment :: File Managers",
|
"Topic :: Desktop Environment :: File Managers",
|
||||||
]
|
]
|
||||||
|
|
||||||
LONG_DESCRIPTION = (
|
with open("README.rst", "rt") as f1, open("CHANGES.rst", "rt") as f2:
|
||||||
open("README.rst", "rt").read() + "\n\n" + open("CHANGES.rst", "rt").read()
|
LONG_DESCRIPTION = f1.read() + "\n\n" + f2.read()
|
||||||
)
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="Send2Trash",
|
name="Send2Trash",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user