From 676bbd02fec157b48e21eba53b6d5f1e326a6000 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Wed, 23 Sep 2015 20:06:07 -0700 Subject: [PATCH] Allow to pass only one file name to unlink-services --- unlink-services.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/unlink-services.py b/unlink-services.py index 9ccadf99..7594032c 100755 --- a/unlink-services.py +++ b/unlink-services.py @@ -3,7 +3,11 @@ import sys import yaml -input_file, output_file = sys.argv[1:3] +# You can specify 1 or 2 parameters: +# - with 1 parameter, the same file will be used for in and out +# - with 2 parameters, the 1st is the input, the 2nd the output +input_file = sys.argv[1] +output_file = sys.argv[:1] stack = yaml.load(open(input_file))