From 56d8d05e777e3831b9a0fab0bbdd45af72185b9f Mon Sep 17 00:00:00 2001 From: Joshua Blum Date: Fri, 24 Apr 2015 12:47:42 +0300 Subject: Provide exception information when reading config --- dotbot/util/string.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 dotbot/util/string.py (limited to 'dotbot/util') diff --git a/dotbot/util/string.py b/dotbot/util/string.py new file mode 100644 index 0000000..2a19b10 --- /dev/null +++ b/dotbot/util/string.py @@ -0,0 +1,4 @@ +def indent_lines(string, amount=2, delimiter='\n'): + whitespace = ' ' * amount + sep = '%s%s' % (delimiter, whitespace) + return '%s%s' % (whitespace, sep.join(string.split(delimiter))) -- cgit v1.2.3