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>
1: D100 Docstring missing
6: I102 copyright year is outdated, expected 2014 but got 2011
36:31: E126 continuation line over-indented for hanging indent
40:1: E302 expected 2 blank lines, found 1
40: D209 Put multi-line docstring closing quotes on separate line
40: D203 Expected 1 blank line *before* class docstring, found 0
40: D204 Expected 1 blank line *after* class docstring, found 0
40: D400 First line should end with '.', not 's'
40: D205 Blank line missing between one-line summary and description
70:30: E251 unexpected spaces around keyword / parameter equals
70:32: E251 unexpected spaces around keyword / parameter equals
70: D400 First line should end with '.', not 't'
71:22: E251 unexpected spaces around keyword / parameter equals
71:24: E251 unexpected spaces around keyword / parameter equals
72:27: E251 unexpected spaces around keyword / parameter equals
72:29: E251 unexpected spaces around keyword / parameter equals
73:31: E251 unexpected spaces around keyword / parameter equals
73:33: E251 unexpected spaces around keyword / parameter equals
74:26: E251 unexpected spaces around keyword / parameter equals
74:28: E251 unexpected spaces around keyword / parameter equals
75:37: E202 whitespace before ')'
92: D401 First line should be imperative: 'Return', not 'Returns'
92: D400 First line should end with '.', not 'b'
96: D401 First line should be imperative: 'Set', not 'Sets'
96: D400 First line should end with '.', not 'b'
100: D401 First line should be imperative: 'Return', not 'Returns'
100: D400 First line should end with '.', not 's'
104: D401 First line should be imperative: 'Set', not 'Sets'
104: D400 First line should end with '.', not 's'
112: D401 First line should be imperative: 'Return', not 'Returns'
112: D209 Put multi-line docstring closing quotes on separate line
118: D401 First line should be imperative: 'Set', not 'Sets'
118: D209 Put multi-line docstring closing quotes on separate line
118: D400 First line should end with '.', not 'b'
124: D401 First line should be imperative: 'Return', not 'Returns'
124: D209 Put multi-line docstring closing quotes on separate line
130: D401 First line should be imperative: 'Set', not 'Sets'
130: D209 Put multi-line docstring closing quotes on separate line
136: D401 First line should be imperative: 'Return', not 'Returns'
136: D400 First line should end with '.', not 'y'
140: D401 First line should be imperative: 'Set', not 'Sets'
140: D400 First line should end with '.', not 'y'
144: D401 First line should be imperative: 'Return', not 'Returns'
144: D400 First line should end with '.', not 'b'
148:1: E302 expected 2 blank lines, found 1
148: D209 Put multi-line docstring closing quotes on separate line
148: D203 Expected 1 blank line *before* class docstring, found 0
148: D204 Expected 1 blank line *after* class docstring, found 0
148: D400 First line should end with '.', not 's'
148: D205 Blank line missing between one-line summary and description
171:32: E251 unexpected spaces around keyword / parameter equals
171:34: E251 unexpected spaces around keyword / parameter equals
171: D400 First line should end with '.', not 't'
172:22: E251 unexpected spaces around keyword / parameter equals
172:24: E251 unexpected spaces around keyword / parameter equals
173:33: E251 unexpected spaces around keyword / parameter equals
173:35: E251 unexpected spaces around keyword / parameter equals
174:25: E251 unexpected spaces around keyword / parameter equals
174:27: E251 unexpected spaces around keyword / parameter equals
175:31: E251 unexpected spaces around keyword / parameter equals
175:33: E251 unexpected spaces around keyword / parameter equals
189: D401 First line should be imperative: 'Return', not 'Returns'
189: D400 First line should end with '.', not 'y'
193: D401 First line should be imperative: 'Set', not 'Sets'
193: D400 First line should end with '.', not 'y'
197: D401 First line should be imperative: 'Return', not 'Returns'
197: D400 First line should end with '.', not 'l'
197: D205 Blank line missing between one-line summary and description
203: D401 First line should be imperative: 'Set', not 'Sets'
203: D205 Blank line missing between one-line summary and description
210: D401 First line should be imperative: 'Return', not 'Returns'
210: D400 First line should end with '.', not 'y'
214: D401 First line should be imperative: 'Set', not 'Sets'
214: D400 First line should end with '.', not 'y'
218: D401 First line should be imperative: 'Return', not 'Returns'
218: D400 First line should end with '.', not 'y'
222: D401 First line should be imperative: 'Set', not 'Sets'
222: D400 First line should end with '.', not 'y'
226: D401 First line should be imperative: 'Return', not 'Returns'
226: D400 First line should end with '.', not 'b'
230:1: E302 expected 2 blank lines, found 1
230: D203 Expected 1 blank line *before* class docstring, found 0
230: D204 Expected 1 blank line *after* class docstring, found 0
250: D400 First line should end with '.', not 't'
252:20: E251 unexpected spaces around keyword / parameter equals
252:22: E251 unexpected spaces around keyword / parameter equals
253:24: E251 unexpected spaces around keyword / parameter equals
253:26: E251 unexpected spaces around keyword / parameter equals
254:32: E251 unexpected spaces around keyword / parameter equals
254:34: E251 unexpected spaces around keyword / parameter equals
270:39: E251 unexpected spaces around keyword / parameter equals
270:41: E251 unexpected spaces around keyword / parameter equals
270: D401 First line should be imperative: 'Return', not 'Returns'
270: D209 Put multi-line docstring closing quotes on separate line
270: D400 First line should end with '.', not 'e'
270: D205 Blank line missing between one-line summary and description
277:51: E251 unexpected spaces around keyword / parameter equals
277:53: E251 unexpected spaces around keyword / parameter equals
281: D401 First line should be imperative: 'Set', not 'Sets'
281: D209 Put multi-line docstring closing quotes on separate line
281: D400 First line should end with '.', not 'n'
288: D401 First line should be imperative: 'Return', not 'Returns'
288: D209 Put multi-line docstring closing quotes on separate line
288: D400 First line should end with '.', not 't'
294: D401 First line should be imperative: 'Set', not 'Sets'
294: D209 Put multi-line docstring closing quotes on separate line
300: D401 First line should be imperative: 'Set', not 'Sets'
300: D209 Put multi-line docstring closing quotes on separate line
300: D400 First line should end with '.', not 't'
306: D401 First line should be imperative: 'Return', not 'Returns'
306: D209 Put multi-line docstring closing quotes on separate line
306: D400 First line should end with '.', not 't'
312: D401 First line should be imperative: 'Return', not 'Returns'
312: D400 First line should end with '.', not 't'
316: D401 First line should be imperative: 'Set', not 'Sets'
316: D209 Put multi-line docstring closing quotes on separate line
316: D400 First line should end with '.', not 't'
322: D401 First line should be imperative: 'Return', not 'Returns'
322: D400 First line should end with '.', not 't'
326: D401 First line should be imperative: 'Return', not 'Returns'
326: D400 First line should end with '.', not 't'
333: D401 First line should be imperative: 'Create', not 'Creates'
345:41: E231 missing whitespace after ':'
347:63: E127 continuation line over-indented for visual indent
348:36: E231 missing whitespace after ':'
348:54: E231 missing whitespace after ':'
348:71: E231 missing whitespace after ':'
349:37: E231 missing whitespace after ':'
349:54: E231 missing whitespace after ':'
349:72: E231 missing whitespace after ':'
350:35: E231 missing whitespace after ':'
352:67: E127 continuation line over-indented for visual indent
353:67: E127 continuation line over-indented for visual indent
358:1: E302 expected 2 blank lines, found 1
358: D203 Expected 1 blank line *before* class docstring, found 0
358: D204 Expected 1 blank line *after* class docstring, found 0
380: D400 First line should end with '.', not 't'
381:31: E251 unexpected spaces around keyword / parameter equals
381:33: E251 unexpected spaces around keyword / parameter equals
382:37: E251 unexpected spaces around keyword / parameter equals
382:39: E251 unexpected spaces around keyword / parameter equals
383:20: E251 unexpected spaces around keyword / parameter equals
383:22: E251 unexpected spaces around keyword / parameter equals
384:24: E251 unexpected spaces around keyword / parameter equals
384:26: E251 unexpected spaces around keyword / parameter equals
385:32: E251 unexpected spaces around keyword / parameter equals
385:34: E251 unexpected spaces around keyword / parameter equals
402: D401 First line should be imperative: 'Return', not 'Returns'
402: D209 Put multi-line docstring closing quotes on separate line
402: D400 First line should end with '.', not 'b'
408: D401 First line should be imperative: 'Set', not 'Sets'
415: D401 First line should be imperative: 'Add', not 'Adds'
415: D400 First line should end with '.', not 's'
423: D401 First line should be imperative: 'Return', not 'Returns'
423: D209 Put multi-line docstring closing quotes on separate line
423: D400 First line should end with '.', not 'n'
429: D401 First line should be imperative: 'Set', not 'Sets'
429: D209 Put multi-line docstring closing quotes on separate line
435: D401 First line should be imperative: 'Set', not 'Sets'
435: D209 Put multi-line docstring closing quotes on separate line
435: D400 First line should end with '.', not 't'
441: D401 First line should be imperative: 'Return', not 'Returns'
441: D209 Put multi-line docstring closing quotes on separate line
441: D400 First line should end with '.', not 't'
447: D401 First line should be imperative: 'Set', not 'Sets'
447: D400 First line should end with '.', not 't'
451: D401 First line should be imperative: 'Add', not 'Adds'
451: D400 First line should end with '.', not 'd'
459: D401 First line should be imperative: 'Return', not 'Returns'
459: D400 First line should end with '.', not 't'
463: D401 First line should be imperative: 'Return', not 'Returns'
463: D400 First line should end with '.', not 't'
467: D401 First line should be imperative: 'Return', not 'Returns'
467: D209 Put multi-line docstring closing quotes on separate line
473: D401 First line should be imperative: 'Set', not 'Sets'
473: D209 Put multi-line docstring closing quotes on separate line
479: D401 First line should be imperative: 'Return', not 'Returns'
479: D400 First line should end with '.', not 't'
488:1: E302 expected 2 blank lines, found 1
488: D203 Expected 1 blank line *before* class docstring, found 0
488: D204 Expected 1 blank line *after* class docstring, found 0
488: D400 First line should end with '.', not 'g'
488: D205 Blank line missing between one-line summary and description
496:54: E251 unexpected spaces around keyword / parameter equals
496:56: E251 unexpected spaces around keyword / parameter equals
496: D400 First line should end with '.', not 'n'
503: D401 First line should be imperative: 'Return', not 'Returns'
503: D400 First line should end with '.', not 's'
503: D205 Blank line missing between one-line summary and description
510: D401 First line should be imperative: 'Return', not 'Returns'
510: D400 First line should end with '.', not 'e'
510: D205 Blank line missing between one-line summary and description
517:1: E302 expected 2 blank lines, found 1
517: D401 First line should be imperative: 'Save', not 'Saves'
532:1: E302 expected 2 blank lines, found 1
532: D401 First line should be imperative: 'Delete', not 'Deletes'
532: D202 No blank lines allowed *after* function docstring, found 1
532: D400 First line should end with '.', not 'e'
546:1: E302 expected 2 blank lines, found 1
546: D401 First line should be imperative: 'Check', not 'Checks'
546: D202 No blank lines allowed *after* function docstring, found 1
546: D400 First line should end with '.', not 'e'
563:1: E302 expected 2 blank lines, found 1
563: D401 First line should be imperative: 'Load', not 'Loads'
563: D209 Put multi-line docstring closing quotes on separate line
563: D202 No blank lines allowed *after* function docstring, found 1
594:1: E302 expected 2 blank lines, found 1
594: D401 First line should be imperative: 'Load', not 'Loads'
594: D209 Put multi-line docstring closing quotes on separate line
594: D202 No blank lines allowed *after* function docstring, found 1
625:1: E302 expected 2 blank lines, found 1
625: D401 First line should be imperative: 'Load', not 'Loads'
625: D209 Put multi-line docstring closing quotes on separate line
625: D202 No blank lines allowed *after* function docstring, found 1
661:1: E302 expected 2 blank lines, found 1
661: D401 First line should be imperative: 'Insert', not 'Inserts'
661: D209 Put multi-line docstring closing quotes on separate line
674:25: E127 continuation line over-indented for visual indent
684:25: E127 continuation line over-indented for visual indent
686:25: E124 closing bracket does not match visual indentation
689:1: E302 expected 2 blank lines, found 1
689: D401 First line should be imperative: 'Update', not 'Updates'
700:17: E127 continuation line over-indented for visual indent
701:17: E128 continuation line under-indented for visual indent
702:17: E128 continuation line under-indented for visual indent
703:17: E128 continuation line under-indented for visual indent
704:17: E128 continuation line under-indented for visual indent
705:17: E128 continuation line under-indented for visual indent
706:17: E124 closing bracket does not match visual indentation
710:1: E302 expected 2 blank lines, found 1
710: D401 First line should be imperative: 'Save', not 'Saves'
710: D202 No blank lines allowed *after* function docstring, found 1
726:1: E302 expected 2 blank lines, found 1
726: D401 First line should be imperative: 'Check', not 'Checks'
726: D202 No blank lines allowed *after* function docstring, found 1
726: D400 First line should end with '.', not 'e'
744:1: E302 expected 2 blank lines, found 1
744: D401 First line should be imperative: 'Insert', not 'Inserts'
744: D209 Put multi-line docstring closing quotes on separate line
744: D202 No blank lines allowed *after* function docstring, found 1
755:70: E225 missing whitespace around operator
764:25: E127 continuation line over-indented for visual indent
773:25: E127 continuation line over-indented for visual indent
775:25: E124 closing bracket does not match visual indentation
779:1: E302 expected 2 blank lines, found 1
779: D401 First line should be imperative: 'Update', not 'Updates'
779: D202 No blank lines allowed *after* function docstring, found 1
792:17: E127 continuation line over-indented for visual indent
793:26: E127 continuation line over-indented for visual indent
794:26: E127 continuation line over-indented for visual indent
795:26: E127 continuation line over-indented for visual indent
796:26: E127 continuation line over-indented for visual indent
797:17: E124 closing bracket does not match visual indentation
801:1: E302 expected 2 blank lines, found 1
801: D401 First line should be imperative: 'Return', not 'Returns'
801: D209 Put multi-line docstring closing quotes on separate line
801: D202 No blank lines allowed *after* function docstring, found 1
801: D400 First line should end with '.', not 's'
836:1: E302 expected 2 blank lines, found 1
836: D401 First line should be imperative: 'Load', not 'Loads'
836: D209 Put multi-line docstring closing quotes on separate line
836: D202 No blank lines allowed *after* function docstring, found 1
864:1: E302 expected 2 blank lines, found 1
864: D401 First line should be imperative: 'Delete', not 'Deletes'
864: D400 First line should end with '.', not 'e'
878:1: E302 expected 2 blank lines, found 1
878: D401 First line should be imperative: 'Save', not 'Saves'
878: D400 First line should end with '.', not 't'
901:25: E128 continuation line under-indented for visual indent
913:1: E302 expected 2 blank lines, found 1
913: D401 First line should be imperative: 'Save', not 'Saves'
913: D202 No blank lines allowed *after* function docstring, found 1
913: D400 First line should end with '.', not 'b'
913: D205 Blank line missing between one-line summary and description
953:38: F841 local variable 'exception' is assigned to but never used
956:32: E128 continuation line under-indented for visual indent
958:1: E302 expected 2 blank lines, found 1
958: D401 First line should be imperative: 'Save', not 'Saves'
958: D400 First line should end with '.', not 'y'
974:12: E714 test for object identity should be 'is not'
977:1: E302 expected 2 blank lines, found 1
977: D401 First line should be imperative: 'Create', not 'Creates'
977: D209 Put multi-line docstring closing quotes on separate line
977: D400 First line should end with '.', not 't'
977: D205 Blank line missing between one-line summary and description
994:69: E251 unexpected spaces around keyword / parameter equals
994:71: E251 unexpected spaces around keyword / parameter equals
1004:1: E302 expected 2 blank lines, found 1
1004: D401 First line should be imperative: 'Zip', not 'Zips'
1004: D400 First line should end with '.', not 'o'
1004: D205 Blank line missing between one-line summary and description
1014:36: E251 unexpected spaces around keyword / parameter equals
1014:38: E251 unexpected spaces around keyword / parameter equals
1014:49: E251 unexpected spaces around keyword / parameter equals
1014:51: E251 unexpected spaces around keyword / parameter equals
1020:1: E302 expected 2 blank lines, found 1
1020:70: E251 unexpected spaces around keyword / parameter equals
1020:72: E251 unexpected spaces around keyword / parameter equals
1020: D401 First line should be imperative: 'Write', not 'Writes'
1020: D400 First line should end with '.', not 'y'
1020: D205 Blank line missing between one-line summary and description
1043:1: E302 expected 2 blank lines, found 1
1070:1: E302 expected 2 blank lines, found 1
1070: D400 First line should end with '.', not 's'
1070: D205 Blank line missing between one-line summary and description
1087:1: E302 expected 2 blank lines, found 1
1087: D401 First line should be imperative: 'Load', not 'Loads'
1087: D209 Put multi-line docstring closing quotes on separate line
1087: D202 No blank lines allowed *after* function docstring, found 1
1119:1: E302 expected 2 blank lines, found 1
1119: D401 First line should be imperative: 'Retrieve', not 'Retrieves'
1155:1: E302 expected 2 blank lines, found 1
1155: D401 First line should be imperative: 'Check', not 'Checks'
1155: D400 First line should end with '.', not 'b'
1173:1: E302 expected 2 blank lines, found 1
1173: D401 First line should be imperative: 'Check', not 'Checks'
1173: D400 First line should end with '.', not 't'
1190:1: E302 expected 2 blank lines, found 1
1190: D401 First line should be imperative: 'Check', not 'Checks'
1190: D400 First line should end with '.', not 'y'
1211:1: E302 expected 2 blank lines, found 1
1211: D401 First line should be imperative: 'Insert', not 'Inserts'
1211: D209 Put multi-line docstring closing quotes on separate line
1211: D202 No blank lines allowed *after* function docstring, found 1
1224:41: E225 missing whitespace around operator
1236:25: E128 continuation line under-indented for visual indent
1245:25: E127 continuation line over-indented for visual indent
1247:25: E124 closing bracket does not match visual indentation
1251:1: E302 expected 2 blank lines, found 1
1251: D401 First line should be imperative: 'Check', not 'Checks'
1251: D202 No blank lines allowed *after* function docstring, found 1
1251: D400 First line should end with '.', not 'e'