Fix when selection file in attachment is canceled
This commit is contained in:
1 parent
d12fe4d9d7
commit
4d6f1e8027
1 file changed
+2
@@ -181,6 +181,8 @@ class Attachment(object):
|
||||
filenames = common.file_selection(_('Open...'), preview=True,
|
||||
multi=True, parent=self.win,
|
||||
filters=[filter_all, filter_image])
|
||||
if not filenames:
|
||||
return
|
||||
for filename in filenames:
|
||||
value = file(filename, 'rb').read()
|
||||
name = os.path.basename(filename)
|
||||
|
||||
Reference in new issue
Block a user