mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1643228 [UnboundLocalError while creating icon theme](https://bugs.launchpad.net/calibre/+bug/1643228)
This commit is contained in:
parent
ba786a2de1
commit
67709b515a
@ -18,6 +18,7 @@ HELPER = os.path.join(base, 'calibre-file-dialog.exe')
|
||||
def is_ok():
|
||||
return os.path.exists(HELPER)
|
||||
|
||||
|
||||
try:
|
||||
from calibre.constants import filesystem_encoding
|
||||
from calibre.utils.filenames import expanduser
|
||||
@ -266,7 +267,7 @@ def choose_save_file(window, name, title, filters=[], all_files=True, initial_pa
|
||||
if all_files:
|
||||
file_types.append((_('All files'), ['*']))
|
||||
all_exts = []
|
||||
for _, exts in file_types:
|
||||
for ftext, exts in file_types:
|
||||
for ext in exts:
|
||||
if '*' not in ext:
|
||||
all_exts.append(ext.lower())
|
||||
@ -355,5 +356,7 @@ def test(helper=HELPER):
|
||||
if q != echo:
|
||||
raise RuntimeError('Unexpected response: %r' % server.data)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
choose_save_file(None, 'xxx', 'yyy')
|
||||
test(sys.argv[-1])
|
||||
|
Loading…
x
Reference in New Issue
Block a user