1.1 --- a/MoinShare.py Sat Jun 22 00:27:29 2013 +0200
1.2 +++ b/MoinShare.py Sat Jun 22 00:37:45 2013 +0200
1.3 @@ -297,29 +297,7 @@
1.4
1.5 "Return the parameters from the given 'source_definition' string."
1.6
1.7 - parameters = {}
1.8 - unqualified = ("type", "location")
1.9 -
1.10 - for arg in source_definition.split():
1.11 - try:
1.12 - argname, argvalue = arg.split("=", 1)
1.13 -
1.14 - # Detect unlikely parameter names.
1.15 -
1.16 - if not argname.isalpha():
1.17 - raise ValueError
1.18 -
1.19 - parameters[argname] = argvalue
1.20 -
1.21 - # Unqualified parameters are assumed to be one of a recognised set.
1.22 -
1.23 - except ValueError:
1.24 - for argname in unqualified:
1.25 - if not parameters.has_key(argname):
1.26 - parameters[argname] = arg
1.27 - break
1.28 -
1.29 - return parameters
1.30 + return parseDictEntry(source_definition, ("type", "location"))
1.31
1.32 # HTML parsing support.
1.33