[[PATCH flasher] 3/6] Split list-confignames implementation into a separate function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stephen Warren <swarren@xxxxxxxxxx>

This moves towards each sub-command being a separate function

Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
---
 tegra-uboot-flasher | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tegra-uboot-flasher b/tegra-uboot-flasher
index ef73e2f..390ae0e 100755
--- a/tegra-uboot-flasher
+++ b/tegra-uboot-flasher
@@ -86,6 +86,10 @@ def find_config_dir():
     socname = boards[boardname]['soc']
     out_board_dir = os.path.join(args.data_dir, boardname)
 
+def func_list_configs():
+    for configname in sorted(configs.keys()):
+        print configname
+
 parser = argparse.ArgumentParser(description='Write an image to a Tegra board\'s flash')
 parser.add_argument('--debug', action='store_true',
                    help='Turn on debugging prints')
@@ -129,8 +133,7 @@ if not args.data_dir:
 load_configs(os.path.join(args.data_dir, 'configs'))
 
 if args.list_confignames:
-    for configname in sorted(configs.keys()):
-        print configname
+    func_list_configs()
     sys.exit(0)
 
 find_config_dir()
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux