legacy: fix for run_sql import in bibrecord

* Addresses issue with imports outside application context.  (closes #2295)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
4: I102 copyright year is outdated, expected 2014 but got 2013
23:14: E401 multiple imports on one line
30:1: F401 'record_order_fields' imported but unused
31:6: E126 continuation line over-indented for hanging indent
40: D400 First line should end with '.', not 'd'
40: D205 Blank line missing between one-line summary and description
40: D208 Docstring is over-indented
49:14: E126 continuation line over-indented for hanging indent
49:19: E203 whitespace before ':'
50:19: E203 whitespace before ':'
51:19: E203 whitespace before ':'
52:19: E203 whitespace before ':'
53:19: E203 whitespace before ':'
54:19: E203 whitespace before ':'
55:12: E126 continuation line over-indented for hanging indent
58: D205 Blank line missing between one-line summary and description
58: D208 Docstring is over-indented
67:14: E126 continuation line over-indented for hanging indent
71:12: E126 continuation line over-indented for hanging indent
74: D205 Blank line missing between one-line summary and description
74: D208 Docstring is over-indented
81: D205 Blank line missing between one-line summary and description
81: D208 Docstring is over-indented
88: D400 First line should end with '.', not 't'
88: D205 Blank line missing between one-line summary and description
88: D208 Docstring is over-indented
96: D400 First line should end with '.', not 'e'
96: D205 Blank line missing between one-line summary and description
96: D208 Docstring is over-indented
104: D205 Blank line missing between one-line summary and description
104: D208 Docstring is over-indented
111: D205 Blank line missing between one-line summary and description
111: D208 Docstring is over-indented
118: D205 Blank line missing between one-line summary and description
118: D208 Docstring is over-indented
125: D205 Blank line missing between one-line summary and description
125: D208 Docstring is over-indented
142: D400 First line should end with '.', not 's'
142: D205 Blank line missing between one-line summary and description
142: D208 Docstring is over-indented
153:15: E262 inline comment should start with '# '
154:22: E262 inline comment should start with '# '
155:22: E111 indentation is not a multiple of four
155:22: E113 unexpected indentation
176:24: E201 whitespace after '{'
176:30: E203 whitespace before ':'
177:24: E128 continuation line under-indented for visual indent
177:29: E203 whitespace before ':'
178:24: E128 continuation line under-indented for visual indent
178:29: E203 whitespace before ':'
179:22: E124 closing bracket does not match visual indentation
188:46: E201 whitespace after '{'
188:52: E203 whitespace before ':'
189:52: E203 whitespace before ':'
190:45: E124 closing bracket does not match visual indentation
197:46: E201 whitespace after '{'
197:52: E203 whitespace before ':'
198:52: E203 whitespace before ':'
199:45: E124 closing bracket does not match visual indentation
205:50: E201 whitespace after '{'
205:56: E203 whitespace before ':'
206:56: E203 whitespace before ':'
206:74: E202 whitespace before '}'
224:61: E502 the backslash is redundant between brackets
225:68: E502 the backslash is redundant between brackets
226:57: E502 the backslash is redundant between brackets
229:55: E502 the backslash is redundant between brackets
239:49: E201 whitespace after '{'
239:55: E203 whitespace before ':'
239:63: E202 whitespace before '}'
240:60: E201 whitespace after '{'
240:72: E203 whitespace before ':'
240:80: E202 whitespace before '}'
243:59: E502 the backslash is redundant between brackets
264:46: E201 whitespace after '{'
264:52: E203 whitespace before ':'
265:52: E203 whitespace before ':'
265:70: E202 whitespace before '}'
295:53: E502 the backslash is redundant between brackets
296:53: E502 the backslash is redundant between brackets
297:49: E502 the backslash is redundant between brackets
306: D400 First line should end with '.', not ','
306: D205 Blank line missing between one-line summary and description
306: D208 Docstring is over-indented
327:47: E201 whitespace after '{'
327:54: E203 whitespace before ':'
328:55: E203 whitespace before ':'
328:68: E202 whitespace before '}'
334:23: E221 multiple spaces before operator
344:78: E502 the backslash is redundant between brackets
345:25: E129 visually indented line with same indent as next logical line
351:43: E126 continuation line over-indented for hanging indent
355:47: E126 continuation line over-indented for hanging indent
360:35: E201 whitespace after '{'
360:52: E203 whitespace before ':'
361:52: E203 whitespace before ':'
362:52: E203 whitespace before ':'
363:34: E124 closing bracket does not match visual indentation
381:35: E201 whitespace after '{'
381:52: E203 whitespace before ':'
382:52: E203 whitespace before ':'
383:52: E203 whitespace before ':'
384:34: E124 closing bracket does not match visual indentation
387:35: E201 whitespace after '{'
387:52: E203 whitespace before ':'
388:52: E203 whitespace before ':'
389:34: E124 closing bracket does not match visual indentation
392:39: E201 whitespace after '{'
392:45: E203 whitespace before ':'
392:58: E202 whitespace before '}'
396: D400 First line should end with '.', not 'm'
396: D205 Blank line missing between one-line summary and description
396: D208 Docstring is over-indented
415:29: E201 whitespace after '{'
415:35: E203 whitespace before ':'
415:43: E202 whitespace before '}'
416:35: E201 whitespace after '{'
416:47: E203 whitespace before ':'
416:59: E202 whitespace before '}'
421:70: E502 the backslash is redundant between brackets
421:26: E203 whitespace before ':'
422:29: E131 continuation line unaligned for hanging indent
423:26: E203 whitespace before ':'
424:18: E121 continuation line under-indented for hanging indent
429:26: E203 whitespace before ':'
430:26: E203 whitespace before ':'
431:18: E121 continuation line under-indented for hanging indent
440:58: E502 the backslash is redundant between brackets
445:50: E201 whitespace after '{'
445:67: E203 whitespace before ':'
445:78: E202 whitespace before '}'
451:33: E201 whitespace after '{'
451:49: E203 whitespace before ':'
451:63: E202 whitespace before '}'
453:33: E201 whitespace after '{'
453:50: E203 whitespace before ':'
453:64: E202 whitespace before '}'
454:66: E502 the backslash is redundant between brackets
460: D205 Blank line missing between one-line summary and description
460: D208 Docstring is over-indented
502: D400 First line should end with '.', not 'm'
502: D205 Blank line missing between one-line summary and description
502: D208 Docstring is over-indented
513:20: E262 inline comment should start with '# '
514:20: E111 indentation is not a multiple of four
514:20: E113 unexpected indentation
515:20: E111 indentation is not a multiple of four
515:20: E113 unexpected indentation
530:80: E502 the backslash is redundant between brackets
531:66: E502 the backslash is redundant between brackets
545:79: E502 the backslash is redundant between brackets
546:69: E502 the backslash is redundant between brackets
547:80: E502 the backslash is redundant between brackets
550:42: E222 multiple spaces after operator
551:22: E127 continuation line over-indented for visual indent
551:76: E502 the backslash is redundant between brackets
557:76: E502 the backslash is redundant between brackets
558:79: E502 the backslash is redundant between brackets
559:80: E502 the backslash is redundant between brackets
560:77: E502 the backslash is redundant between brackets
561:78: E502 the backslash is redundant between brackets
567:76: E502 the backslash is redundant between brackets
568:78: E502 the backslash is redundant between brackets
569:77: E502 the backslash is redundant between brackets
570:67: E502 the backslash is redundant between brackets
586:71: E502 the backslash is redundant between brackets
593:9: E303 too many blank lines (2)
598: D401 First line should be imperative: 'Print', not 'Prints'
603:21: E211 whitespace before '('
627: D400 First line should end with '.', not 'e'
627: D205 Blank line missing between one-line summary and description
627: D208 Docstring is over-indented
640:16: E201 whitespace after '{'
640:31: E203 whitespace before ':'
641:31: E203 whitespace before ':'
642:31: E203 whitespace before ':'
643:31: E203 whitespace before ':'
644:31: E203 whitespace before ':'
645:31: E203 whitespace before ':'
646:31: E203 whitespace before ':'
647:15: E124 closing bracket does not match visual indentation
655:39: F821 undefined name '__revision__'
703:16: E126 continuation line over-indented for hanging indent
715:85: E502 the backslash is redundant between brackets
716:74: E502 the backslash is redundant between brackets
717:71: E502 the backslash is redundant between brackets
718:52: F821 undefined name 'cgf'
747:1: W391 blank line at end of file