From 264945a1f77598572971750db89b0ee7cdf69524 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 13 Oct 2013 13:43:16 +0200 Subject: [PATCH] adding a single comma at the end of the options list confuse the module it start to duplicate line, because this create a empty option in the list, and so the module add a new line along the previous one. See >>> ' a,b, '.strip().split(',') ['a', 'b', ''] --- library/system/authorized_key | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/system/authorized_key b/library/system/authorized_key index 26494267d64..269cb728493 100644 --- a/library/system/authorized_key +++ b/library/system/authorized_key @@ -185,6 +185,9 @@ def parseoptions(options): if options: options_list = options.strip().split(",") for option in options_list: + # happen when there is comma at the end + if option == '': + continue if option.find("=") != -1: (arg,val) = option.split("=", 1) else: