From 323188b9631affec42088023a3c5b95fbda0f59e Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 31 Aug 2016 15:15:55 +0200 Subject: [PATCH] devmgr: if only one device is plugged, use it --- lib/plugins.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plugins.py b/lib/plugins.py index 46fba5813..9cbdd1862 100644 --- a/lib/plugins.py +++ b/lib/plugins.py @@ -469,6 +469,8 @@ class DeviceMgr(ThreadJob, PrintError): if not handler.yes_no_question(msg): raise UserCancelled() devices = None + if len(infos) == 1: + return infos[0] # select device by label for info in infos: if info.label == keystore.label: