Skip to content

Commit

Permalink
cleanup log message when a non-managed option is passed to mysqldump
Browse files Browse the repository at this point in the history
A set of mysqldump options are scanned by holland and some basic
safety checks enforced. e.g. flush-privileges isn't supported on mysql 4.1
and dump-events is not supported on 5.0, etc.  When a user passes an explicit
option via additional-options that the mysqldump plugin does not recognize
we flag this as either an 'unparseable option' - which may cause mysqldump to
fail or as a 'user supplied option' - if it looks valid but holland doesn't
have any special check for it.
  • Loading branch information
abg committed Oct 15, 2012
1 parent 024c271 commit 992db6a
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -47,12 +47,12 @@ def check_option(self, option):
try: try:
option, arg = self.OPTION_ARG_CRE.search(option).groups() option, arg = self.OPTION_ARG_CRE.search(option).groups()
except AttributeError: except AttributeError:
raise MyOptionError("Unsupported option %r" % option) raise MyOptionError("Unparseable option '%s'" % option)


option = option.replace('_', '-') option = option.replace('_', '-')


if option not in self._options: if option not in self._options:
raise MyOptionError("Unsupported option %r" % option) raise MyOptionError("User supplied option '%s'" % option)
my_option = self._options[option] my_option = self._options[option]
my_option.check(self.version, arg) my_option.check(self.version, arg)


Expand Down

0 comments on commit 992db6a

Please sign in to comment.