Code clarity fixes
autopep8 -ir -j2 --select=E303,E125 Diff checked manually.
This commit is contained in:
parent
dcb2b61b18
commit
c21d1f7925
37 changed files with 6 additions and 59 deletions
|
|
@ -136,7 +136,6 @@ class Downloadboob:
|
|||
|
||||
return u"%s/%s.%s" % (directory, removeNonAscii(video.id), ext)
|
||||
|
||||
|
||||
def get_linkname(self, video):
|
||||
if not os.path.exists(self.links_directory):
|
||||
os.makedirs(self.links_directory)
|
||||
|
|
@ -151,12 +150,10 @@ class Downloadboob:
|
|||
|
||||
return u"%s/%s (%s).%s" % (self.links_directory, removeSpecial(video.title), removeSpecial(misc), ext)
|
||||
|
||||
|
||||
def is_downloaded(self, video):
|
||||
# check if the file is 0 byte
|
||||
return os.path.isfile(self.get_filename(video))
|
||||
|
||||
|
||||
def remove_download(self, video):
|
||||
path = self.get_filename(video)
|
||||
if os.stat(path).st_size == 0:
|
||||
|
|
@ -169,7 +166,6 @@ class Downloadboob:
|
|||
with open(path, 'w'):
|
||||
pass
|
||||
|
||||
|
||||
def set_linkname(self, video):
|
||||
linkname = self.get_linkname(video)
|
||||
idname = self.get_filename(video, relative=True)
|
||||
|
|
@ -178,7 +174,6 @@ class Downloadboob:
|
|||
print "%s -> %s" % (linkname, idname)
|
||||
os.symlink(idname, linkname)
|
||||
|
||||
|
||||
def do_download(self, video):
|
||||
if not video:
|
||||
print >>sys.stderr, 'Video not found: %s' % video
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue