kopia lustrzana https://github.com/micropython/micropython-lib
shutil: Don't allow an empty string in rmtree.
rodzic
4ae896afdc
commit
69e8a502dd
|
@ -1,3 +1,3 @@
|
|||
metadata(version="0.0.4")
|
||||
metadata(version="0.0.5")
|
||||
|
||||
module("shutil.py")
|
||||
|
|
|
@ -6,6 +6,9 @@ _ntuple_diskusage = namedtuple("usage", ("total", "used", "free"))
|
|||
|
||||
|
||||
def rmtree(d):
|
||||
if not d:
|
||||
raise ValueError
|
||||
|
||||
for name, type, *_ in os.ilistdir(d):
|
||||
path = d + "/" + name
|
||||
if type & 0x4000: # dir
|
||||
|
|
Ładowanie…
Reference in New Issue