Skip to content

Instantly share code, notes, and snippets.

@cp16net
Created March 11, 2014 22:59
Show Gist options
  • Select an option

  • Save cp16net/9496808 to your computer and use it in GitHub Desktop.

Select an option

Save cp16net/9496808 to your computer and use it in GitHub Desktop.
diff --git a/trove/common/configurations.py b/trove/common/configurations.py
index ea2b28f..87111c1 100644
--- a/trove/common/configurations.py
+++ b/trove/common/configurations.py
@@ -78,6 +78,12 @@ class MySQLConfParser(object):
continue
elif line_clean.startswith(':'):
continue
+ # python 2.6 configparser doesnt like params without values
+ elif line_clean.startswith('[') and line_clean.endswith(']'):
+ ret.append(line_clean)
+ elif line_clean and "=" not in line_clean:
+ LOG.debug("fixing line without '=' in it: %s" % line_clean)
+ ret.append(line_clean+" = 1")
else:
ret.append(line_clean)
rendered = "\n".join(ret)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment