Oaiharvest admin fixes

Fixes problems with OAI harvest admin interface as reported in  #2188.

Also makes it more pleasant to look at.
38:1: E302 expected 2 blank lines, found 1
38: D400 First line should end with '.', not 'e'
65:1: E302 expected 2 blank lines, found 1
65: D103 Docstring missing
77:78: E502 the backslash is redundant between brackets
78:62: E502 the backslash is redundant between brackets
96:21: E711 comparison to None should be 'if cond is None:'
140:1: E302 expected 2 blank lines, found 1
140: D103 Docstring missing
141:78: E502 the backslash is redundant between brackets
142:24: E127 continuation line over-indented for visual indent
142:63: E502 the backslash is redundant between brackets
143:24: E127 continuation line over-indented for visual indent
170:21: E711 comparison to None should be 'if cond is None:'
172:21: E711 comparison to None should be 'if cond is None:'
217: D103 Docstring missing
227:29: E251 unexpected spaces around keyword / parameter equals
227:31: E251 unexpected spaces around keyword / parameter equals
231:26: E231 missing whitespace after ','
235:53: E128 continuation line under-indented for visual indent
236:53: E128 continuation line under-indented for visual indent
240:29: E251 unexpected spaces around keyword / parameter equals
240:31: E251 unexpected spaces around keyword / parameter equals
246: D103 Docstring missing
256:29: E251 unexpected spaces around keyword / parameter equals
256:31: E251 unexpected spaces around keyword / parameter equals
259:26: E231 missing whitespace after ','
268:29: E251 unexpected spaces around keyword / parameter equals
268:31: E251 unexpected spaces around keyword / parameter equals
274:58: E251 unexpected spaces around keyword / parameter equals
274:60: E251 unexpected spaces around keyword / parameter equals
274:72: E251 unexpected spaces around keyword / parameter equals
274:74: E251 unexpected spaces around keyword / parameter equals
274: D103 Docstring missing
277:13: E711 comparison to None should be 'if cond is None:'
279:14: E711 comparison to None should be 'if cond is None:'
288:29: E251 unexpected spaces around keyword / parameter equals
288:31: E251 unexpected spaces around keyword / parameter equals
291:26: E231 missing whitespace after ','
295:53: E128 continuation line under-indented for visual indent
296:53: E128 continuation line under-indented for visual indent
297:53: E128 continuation line under-indented for visual indent
301:29: E251 unexpected spaces around keyword / parameter equals
301:31: E251 unexpected spaces around keyword / parameter equals
306:1: E302 expected 2 blank lines, found 1
306: D103 Docstring missing
309:13: E711 comparison to None should be 'if cond is None:'
311:14: E711 comparison to None should be 'if cond is None:'
313:12: E711 comparison to None should be 'if cond is None:'
322:29: E251 unexpected spaces around keyword / parameter equals
322:31: E251 unexpected spaces around keyword / parameter equals
325:26: E231 missing whitespace after ','
329:53: E128 continuation line under-indented for visual indent
330:53: E128 continuation line under-indented for visual indent
331:53: E128 continuation line under-indented for visual indent
332:53: E128 continuation line under-indented for visual indent
333:53: E128 continuation line under-indented for visual indent
337:29: E251 unexpected spaces around keyword / parameter equals
337:31: E251 unexpected spaces around keyword / parameter equals
342:1: E302 expected 2 blank lines, found 1
342:60: E251 unexpected spaces around keyword / parameter equals
342:62: E251 unexpected spaces around keyword / parameter equals
342: D103 Docstring missing
354:26: E231 missing whitespace after ','
358:53: E128 continuation line under-indented for visual indent
359:53: E128 continuation line under-indented for visual indent
368:1: E302 expected 2 blank lines, found 1
368: D103 Docstring missing
395:1: E302 expected 2 blank lines, found 1
395: D103 Docstring missing
407:26: E231 missing whitespace after ','
420:1: E302 expected 2 blank lines, found 1
420:54: E251 unexpected spaces around keyword / parameter equals
420:56: E251 unexpected spaces around keyword / parameter equals
420: D103 Docstring missing
429:29: E251 unexpected spaces around keyword / parameter equals
429:31: E251 unexpected spaces around keyword / parameter equals
432:26: E231 missing whitespace after ','
435:34: E251 unexpected spaces around keyword / parameter equals
435:36: E251 unexpected spaces around keyword / parameter equals
436:72: E251 unexpected spaces around keyword / parameter equals
436:74: E251 unexpected spaces around keyword / parameter equals
440:29: E251 unexpected spaces around keyword / parameter equals
440:31: E251 unexpected spaces around keyword / parameter equals
446: D103 Docstring missing
455:29: E251 unexpected spaces around keyword / parameter equals
455:31: E251 unexpected spaces around keyword / parameter equals
458:26: E231 missing whitespace after ','
462:61: E127 continuation line over-indented for visual indent
466:29: E251 unexpected spaces around keyword / parameter equals
466:31: E251 unexpected spaces around keyword / parameter equals
472: D103 Docstring missing
481:29: E251 unexpected spaces around keyword / parameter equals
481:31: E251 unexpected spaces around keyword / parameter equals
484:26: E231 missing whitespace after ','
488:53: E128 continuation line under-indented for visual indent
488:70: E251 unexpected spaces around keyword / parameter equals
488:72: E251 unexpected spaces around keyword / parameter equals
492:29: E251 unexpected spaces around keyword / parameter equals
492:31: E251 unexpected spaces around keyword / parameter equals
497:1: E302 expected 2 blank lines, found 1
497: D103 Docstring missing
500:16: E126 continuation line over-indented for hanging indent
508:160: E502 the backslash is redundant between brackets
536: D103 Docstring missing
545:29: E251 unexpected spaces around keyword / parameter equals
545:31: E251 unexpected spaces around keyword / parameter equals
548:26: E231 missing whitespace after ','
550:23: E711 comparison to None should be 'if cond is None:'
551:44: E703 statement ends with a semicolon
560: D103 Docstring missing
569:29: E251 unexpected spaces around keyword / parameter equals
569:31: E251 unexpected spaces around keyword / parameter equals
572:26: E231 missing whitespace after ','
574:23: E711 comparison to None should be 'if cond is None:'
575:44: E703 statement ends with a semicolon
587:1: E302 expected 2 blank lines, found 1
587: D103 Docstring missing
629:1: E302 expected 2 blank lines, found 1
629: D290 White spaces around docstring should be trimmed.
629: D400 First line should end with '.', not 't'
635:5: F841 local variable 'result' is assigned to but never used
635:15: E201 whitespace after '{'
637:9: E124 closing bracket does not match visual indentation
640:110: F821 undefined name 'filter_key'
644:1: E302 expected 2 blank lines, found 1
644:35: E251 unexpected spaces around keyword / parameter equals
644:37: E251 unexpected spaces around keyword / parameter equals
644: D103 Docstring missing