kopia lustrzana
				https://github.com/arsenetar/send2trash.git
				synced 2025-09-11 18:08:16 +00:00 
			
		
		
		
	Fix ResourceWarning: unclosed file in setup.py
Also prevent potential identical warning in `plat_other.py`.
This commit is contained in:
		
							rodzic
							
								
									49bc438546
								
							
						
					
					
						commit
						cd8d9fb95e
					
				@ -112,9 +112,8 @@ def trash_move(src, dst, topdir=None):
 | 
			
		||||
    check_create(infopath)
 | 
			
		||||
 | 
			
		||||
    os.rename(src, op.join(filespath, destname))
 | 
			
		||||
    f = open(op.join(infopath, destname + INFO_SUFFIX), "w")
 | 
			
		||||
    f.write(info_for(src, topdir))
 | 
			
		||||
    f.close()
 | 
			
		||||
    with open(op.join(infopath, destname + INFO_SUFFIX), "w") as f:
 | 
			
		||||
        f.write(info_for(src, topdir))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def find_mount_point(path):
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										5
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								setup.py
									
									
									
									
									
								
							@ -17,9 +17,8 @@ CLASSIFIERS = [
 | 
			
		||||
    "Topic :: Desktop Environment :: File Managers",
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
LONG_DESCRIPTION = (
 | 
			
		||||
    open("README.rst", "rt").read() + "\n\n" + open("CHANGES.rst", "rt").read()
 | 
			
		||||
)
 | 
			
		||||
with open("README.rst", "rt") as f1, open("CHANGES.rst", "rt") as f2:
 | 
			
		||||
    LONG_DESCRIPTION = f1.read() + "\n\n" + f2.read()
 | 
			
		||||
 | 
			
		||||
setup(
 | 
			
		||||
    name="Send2Trash",
 | 
			
		||||
 | 
			
		||||
		Ładowanie…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user