mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 11:02:43 +01:00
[PEP8] I didn't had a pep8 checker on vim :c
This commit is contained in:
parent
f554e2e4a0
commit
ea4832e212
2 changed files with 10 additions and 7 deletions
|
|
@ -202,21 +202,24 @@ def sorted_walk(path, ignore=(), logger=None):
|
|||
yield res
|
||||
|
||||
|
||||
#We don't create directories on dry-runs, but we must pretend they exist
|
||||
# We don't create directories on dry-runs, but we must pretend they exist
|
||||
directories_created = Set()
|
||||
|
||||
|
||||
def mkdirall(path, pretend=False):
|
||||
"""Make all the enclosing directories of path (like mkdir -p on the
|
||||
parent).
|
||||
"""
|
||||
|
||||
if pretend:
|
||||
#directory = syspath(ancestry(path)[-1]) # "dirname"
|
||||
# This seems cleaner but MAY have differences on symlinks (leading to an equivalent result)
|
||||
# directory = syspath(ancestry(path)[-1]) # "dirname"
|
||||
# This seems cleaner but MAY have differences on symlinks (leading to
|
||||
# an equivalent result)
|
||||
directory = os.path.dirname(path)
|
||||
if directory not in directories_created:
|
||||
directories_created.add(directory)
|
||||
#This is not a "raw" translation, but it's brief one
|
||||
print("mkdir -p '%s'" % (directory) )
|
||||
# This is not a "raw" translation, but it's brief one
|
||||
print("mkdir -p '%s'" % (directory))
|
||||
return
|
||||
for ancestor in ancestry(path):
|
||||
if not os.path.isdir(syspath(ancestor)):
|
||||
|
|
|
|||
|
|
@ -178,8 +178,8 @@ def convert_item(dest_dir, keep_new, path_formats, pretend=False):
|
|||
continue
|
||||
|
||||
if pretend:
|
||||
#Should we add support for tagging and after_convert plugins?
|
||||
continue #A yield is used at the start of the loop
|
||||
# Should we add support for tagging and after_convert plugins?
|
||||
continue # A yield is used at the start of the loop
|
||||
|
||||
# Write tags from the database to the converted file.
|
||||
item.write(path=converted)
|
||||
|
|
|
|||
Loading…
Reference in a new issue