fixes #604 catch method not found for handling pyperclip not found

This commit is contained in:
Marcelo Glezer 2015-06-01 12:06:46 -03:00
parent 7439e244a6
commit 14bce0dd12

View File

@ -287,12 +287,12 @@ def copy_flow(part, scope, flow, master, state):
try:
master.add_event(str(len(data)))
pyperclip.copy(data)
except (RuntimeError, UnicodeDecodeError):
except (RuntimeError, UnicodeDecodeError, AttributeError):
def save(k):
if k == "y":
ask_save_path("Save data", data, master, state)
signals.status_prompt_onekey.send(
prompt = "Cannot copy binary data to clipboard. Save as file?",
prompt = "Cannot copy data to clipboard. Save as file?",
keys = (
("yes", "y"),
("no", "n"),