mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-03-17 23:33:43 +01:00
Removed useless function assign to variable
This commit is contained in:
@@ -206,9 +206,6 @@ class CurrentDir(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
relpath = os.path.relpath
|
|
||||||
|
|
||||||
|
|
||||||
def walk(dir):
|
def walk(dir):
|
||||||
''' A nice interface to os.walk '''
|
''' A nice interface to os.walk '''
|
||||||
for record in os.walk(dir):
|
for record in os.walk(dir):
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
import urllib.parse
|
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.utils.config_base import tweaks
|
||||||
from ebook_converter.polyglot.urllib import unquote
|
from ebook_converter.polyglot.urllib import unquote
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ class Resource(object):
|
|||||||
if self.path == basedir:
|
if self.path == basedir:
|
||||||
return '' + frag
|
return '' + frag
|
||||||
try:
|
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
|
except OSError: # On windows path and basedir could be on different drives
|
||||||
rpath = self.path
|
rpath = self.path
|
||||||
return urllib.parse.quote(rpath.replace(os.sep, '/')) + frag
|
return urllib.parse.quote(rpath.replace(os.sep, '/')) + frag
|
||||||
|
|||||||
Reference in New Issue
Block a user