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>
2: I102 copyright year is outdated, expected 2014 but got 2013
47:5: E128 continuation line under-indented for visual indent
48:5: E128 continuation line under-indented for visual indent
49:5: E128 continuation line under-indented for visual indent
70:6: E126 continuation line over-indented for hanging indent
78:36: E126 continuation line over-indented for hanging indent
82:41: E126 continuation line over-indented for hanging indent
104:1: E302 expected 2 blank lines, found 1
104: D290 White spaces around docstring should be trimmed.
104: D400 First line should end with '.', not 'n'
104: D205 Blank line missing between one-line summary and description
108: D290 White spaces around docstring should be trimmed.
108: D400 First line should end with '.', not 'e'
150:1: E302 expected 2 blank lines, found 1
150: D103 Docstring missing
156:1: E302 expected 2 blank lines, found 1
156: D401 First line should be imperative: 'Thi', not 'This'
156: D400 First line should end with '.', not 'l'
156: D205 Blank line missing between one-line summary and description
207:1: E302 expected 2 blank lines, found 1
207: D400 First line should end with '.', not 'e'
207: D205 Blank line missing between one-line summary and description
222:1: E302 expected 2 blank lines, found 1
222: D401 First line should be imperative: 'Ha', not 'Has'
222: D400 First line should end with '.', not 'y'
222: D205 Blank line missing between one-line summary and description
230:1: E302 expected 2 blank lines, found 1
230: D400 First line should end with '.', not 'l'
230: D205 Blank line missing between one-line summary and description
256:1: E302 expected 2 blank lines, found 1
256: D400 First line should end with '.', not 'e'
256: D205 Blank line missing between one-line summary and description
263:1: E302 expected 2 blank lines, found 1
272:1: E302 expected 2 blank lines, found 1
281:1: E302 expected 2 blank lines, found 1
281: D400 First line should end with '.', not 'n'
281: D205 Blank line missing between one-line summary and description
292:1: E302 expected 2 blank lines, found 1
296:1: E302 expected 2 blank lines, found 1
296: D205 Blank line missing between one-line summary and description
307:1: E302 expected 2 blank lines, found 1
307: D103 Docstring missing
311:1: E302 expected 2 blank lines, found 1
311: D400 First line should end with '.', not 'm'
311: D205 Blank line missing between one-line summary and description
378: D400 First line should end with '.', not 'd'
378: D205 Blank line missing between one-line summary and description
391: D290 White spaces around docstring should be trimmed.
391: D400 First line should end with '.', not 'd'
391: D200 One-line docstring should not occupy 2 lines
403: D290 White spaces around docstring should be trimmed.
403: D400 First line should end with '.', not 'e'
403: D205 Blank line missing between one-line summary and description
426: D400 First line should end with '.', not 'e'
426: D205 Blank line missing between one-line summary and description
456:24: E713 test for membership should be 'not in'
465:1: E302 expected 2 blank lines, found 1
465: D401 First line should be imperative: 'Convert', not 'Converts'
465: D400 First line should end with '.', not 'p'
465: D200 One-line docstring should not occupy 3 lines
472:1: E302 expected 2 blank lines, found 1
472: D401 First line should be imperative: 'Convert', not 'Converts'
472: D400 First line should end with '.', not 'e'
472: D200 One-line docstring should not occupy 3 lines
484:1: E302 expected 2 blank lines, found 1
484: D400 First line should end with '.', not 'd'
492:1: E302 expected 2 blank lines, found 1
492: D205 Blank line missing between one-line summary and description
502:1: E302 expected 2 blank lines, found 1
502: D205 Blank line missing between one-line summary and description
513:1: E302 expected 2 blank lines, found 1
513: D205 Blank line missing between one-line summary and description
520:1: E302 expected 2 blank lines, found 1
520: D205 Blank line missing between one-line summary and description
540:1: E302 expected 2 blank lines, found 1
546:1: E302 expected 2 blank lines, found 1
546: D103 Docstring missing
553:1: E302 expected 2 blank lines, found 1
553: D205 Blank line missing between one-line summary and description
569: D290 White spaces around docstring should be trimmed.
569: D205 Blank line missing between one-line summary and description
590:9: E128 continuation line under-indented for visual indent
593:1: E302 expected 2 blank lines, found 1
593: D209 Put multi-line docstring closing quotes on separate line
593: D400 First line should end with '.', not ']'
593: D205 Blank line missing between one-line summary and description
593: D208 Docstring is over-indented
632:1: E302 expected 2 blank lines, found 1
632: D401 First line should be imperative: 'Return', not 'Returns'
632: D400 First line should end with '.', not ']'
637:1: E302 expected 2 blank lines, found 1
655: D205 Blank line missing between one-line summary and description
663:1: E302 expected 2 blank lines, found 1
676:1: E302 expected 2 blank lines, found 1
718:1: E302 expected 2 blank lines, found 1
736: D400 First line should end with '.', not 's'
736: D205 Blank line missing between one-line summary and description
756: D401 First line should be imperative: 'Return', not 'Returns'
756: D290 White spaces around docstring should be trimmed.
756: D400 First line should end with '.', not '0'
756: D205 Blank line missing between one-line summary and description
767:61: E128 continuation line under-indented for visual indent
768:61: E128 continuation line under-indented for visual indent
769:61: E128 continuation line under-indented for visual indent
770:61: E128 continuation line under-indented for visual indent
773: D290 White spaces around docstring should be trimmed.
773: D400 First line should end with '.', not 't'
773: D205 Blank line missing between one-line summary and description
788: D290 White spaces around docstring should be trimmed.
788: D400 First line should end with '.', not 't'
809:48: E128 continuation line under-indented for visual indent
815:1: E302 expected 2 blank lines, found 1
815: D400 First line should end with '.', not 'd'
859:1: E302 expected 2 blank lines, found 1
859: D400 First line should end with '.', not 't'
859: D205 Blank line missing between one-line summary and description
877: D400 First line should end with '.', not 'e'
877: D205 Blank line missing between one-line summary and description
895:5: E122 continuation line missing indentation or outdented
911:36: E127 continuation line over-indented for visual indent
912:36: E127 continuation line over-indented for visual indent
913:36: E127 continuation line over-indented for visual indent
914:36: E127 continuation line over-indented for visual indent
918: D400 First line should end with '.', not 'n'
976: D401 First line should be imperative: 'Create', not 'Creates'
976: D400 First line should end with '.', not 'e'
976: D205 Blank line missing between one-line summary and description
991: D400 First line should end with '.', not 'n'
991: D205 Blank line missing between one-line summary and description
1011: D401 First line should be imperative: 'Change', not 'Changes'
1011: D400 First line should end with '.', not ','
1011: D205 Blank line missing between one-line summary and description
1029:9: E128 continuation line under-indented for visual indent
1039:13: E128 continuation line under-indented for visual indent
1042: D401 First line should be imperative: 'Return', not 'Returns'
1042: D290 White spaces around docstring should be trimmed.
1042: D400 First line should end with '.', not 'e'
1064:17: F821 undefined name 'deserialize'