mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
ae3aa44596
commit
5737ead466
@ -610,7 +610,7 @@ class FileDialog(QObject):
|
|||||||
if not isinstance(initial_dir, basestring):
|
if not isinstance(initial_dir, basestring):
|
||||||
initial_dir = os.path.expanduser(default_dir)
|
initial_dir = os.path.expanduser(default_dir)
|
||||||
self.selected_files = []
|
self.selected_files = []
|
||||||
use_native_dialog = not os.environ.has_key('CALIBRE_NO_NATIVE_FILEDIALOGS')
|
use_native_dialog = 'CALIBRE_NO_NATIVE_FILEDIALOGS' not in os.environ
|
||||||
with SanitizeLibraryPath():
|
with SanitizeLibraryPath():
|
||||||
opts = QFileDialog.Option()
|
opts = QFileDialog.Option()
|
||||||
if not use_native_dialog:
|
if not use_native_dialog:
|
||||||
@ -630,7 +630,8 @@ class FileDialog(QObject):
|
|||||||
ftext, "", opts)
|
ftext, "", opts)
|
||||||
for f in fs:
|
for f in fs:
|
||||||
f = unicode(f)
|
f = unicode(f)
|
||||||
if not f: continue
|
if not f:
|
||||||
|
continue
|
||||||
if not os.path.exists(f):
|
if not os.path.exists(f):
|
||||||
# QFileDialog for some reason quotes spaces
|
# QFileDialog for some reason quotes spaces
|
||||||
# on linux if there is more than one space in a row
|
# on linux if there is more than one space in a row
|
||||||
@ -919,7 +920,6 @@ class Application(QApplication):
|
|||||||
self.file_event_hook(self._file_open_paths)
|
self.file_event_hook(self._file_open_paths)
|
||||||
self._file_open_paths = []
|
self._file_open_paths = []
|
||||||
|
|
||||||
|
|
||||||
def load_translations(self):
|
def load_translations(self):
|
||||||
if self._translator is not None:
|
if self._translator is not None:
|
||||||
self.removeTranslator(self._translator)
|
self.removeTranslator(self._translator)
|
||||||
@ -1060,3 +1060,4 @@ _df = os.environ.get('CALIBRE_DEVELOP_FROM', None)
|
|||||||
if _df and os.path.exists(_df):
|
if _df and os.path.exists(_df):
|
||||||
build_forms(_df)
|
build_forms(_df)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user