1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-01-19 19:14:11 +01:00

Removed useless function assign to variable

This commit is contained in:
2020-07-13 20:33:41 +02:00
parent a618f929a8
commit 16c568eab9
2 changed files with 2 additions and 5 deletions

View File

@@ -206,9 +206,6 @@ class CurrentDir(object):
pass
relpath = os.path.relpath
def walk(dir):
''' A nice interface to os.walk '''
for record in os.walk(dir):

View File

@@ -8,7 +8,7 @@ import re
import sys
import urllib.parse
from ebook_converter import relpath, prints, force_unicode
from ebook_converter import prints, force_unicode
from ebook_converter.utils.config_base import tweaks
from ebook_converter.polyglot.urllib import unquote
@@ -271,7 +271,7 @@ class Resource(object):
if self.path == basedir:
return '' + frag
try:
rpath = relpath(self.path, basedir)
rpath = os.path.relpath(self.path, basedir)
except OSError: # On windows path and basedir could be on different drives
rpath = self.path
return urllib.parse.quote(rpath.replace(os.sep, '/')) + frag