From 109d1a53263ce40f57176de330f3505c1e37d775 Mon Sep 17 00:00:00 2001 From: Alex Schoof Date: Mon, 15 Jun 2015 13:24:56 -0400 Subject: [PATCH 1/2] fix for python 2.6 argparser --- credstash.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/credstash.py b/credstash.py index 9b754b0..0afd8dd 100755 --- a/credstash.py +++ b/credstash.py @@ -94,6 +94,8 @@ def expand_wildcard(string, secrets): def value_or_filename(string): + if string == "": + return "" if string[0] == "@": filename = string[1:] try: From bbe9f1f5f2898dd69d617e4c1f65dea8560d7695 Mon Sep 17 00:00:00 2001 From: Alex Schoof Date: Mon, 15 Jun 2015 13:38:50 -0400 Subject: [PATCH 2/2] added comment to explain string fail-fast --- credstash.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/credstash.py b/credstash.py index 0afd8dd..f06beaa 100755 --- a/credstash.py +++ b/credstash.py @@ -94,6 +94,9 @@ def expand_wildcard(string, secrets): def value_or_filename(string): + # argparse running on old version of python (<2.7) will pass an empty + # string to this function before it passes the actual value. + # If an empty string is passes in, just return an empty string if string == "": return "" if string[0] == "@":