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: I102 copyright year is outdated, expected 2014 but got 2011
39:1: F401 'subprocess' imported but unused
41:1: F401 'invenio' imported but unused
46:28: E126 continuation line over-indented for hanging indent
63:1: E302 expected 2 blank lines, found 1
63: D203 Expected 1 blank line *before* class docstring, found 0
63: D204 Expected 1 blank line *after* class docstring, found 0
63: D400 First line should end with '.', not 's'
65:104: E203 whitespace before ','
65:39: E251 unexpected spaces around keyword / parameter equals
65:41: E251 unexpected spaces around keyword / parameter equals
65:55: E251 unexpected spaces around keyword / parameter equals
65:57: E251 unexpected spaces around keyword / parameter equals
65:71: E251 unexpected spaces around keyword / parameter equals
65:73: E251 unexpected spaces around keyword / parameter equals
65:157: E251 unexpected spaces around keyword / parameter equals
65:159: E251 unexpected spaces around keyword / parameter equals
65:181: E251 unexpected spaces around keyword / parameter equals
65:183: E251 unexpected spaces around keyword / parameter equals
79: D209 Put multi-line docstring closing quotes on separate line
87: D400 First line should end with '.', not 'e'
87: D205 Blank line missing between one-line summary and description
105: D400 First line should end with '.', not 'g'
105: D205 Blank line missing between one-line summary and description
141: D400 First line should end with '.', not 's'
147:1: E302 expected 2 blank lines, found 1
147: D203 Expected 1 blank line *before* class docstring, found 0
147: D204 Expected 1 blank line *after* class docstring, found 0
147: D400 First line should end with '.', not 'd'
158:99: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
162:71: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
166: D400 First line should end with '.', not 'd'
169:23: E127 continuation line over-indented for visual indent
170:42: E128 continuation line under-indented for visual indent
171:42: E128 continuation line under-indented for visual indent
172:42: E128 continuation line under-indented for visual indent
175:65: E128 continuation line under-indented for visual indent
180:1: E302 expected 2 blank lines, found 1
180: D203 Expected 1 blank line *before* class docstring, found 0
180: D400 First line should end with '.', not 'd'
183: D400 First line should end with '.', not 'd'
186:21: E127 continuation line over-indented for visual indent
188:39: E128 continuation line under-indented for visual indent
192:1: E302 expected 2 blank lines, found 1
192: D203 Expected 1 blank line *before* class docstring, found 0
192: D400 First line should end with '.', not 'd'
195: D400 First line should end with '.', not 'd'
198:21: E127 continuation line over-indented for visual indent
202:39: E128 continuation line under-indented for visual indent
208:1: E302 expected 2 blank lines, found 1
208: D203 Expected 1 blank line *before* class docstring, found 0
208: D400 First line should end with '.', not 'd'
211: D202 No blank lines allowed *after* method docstring, found 1
211: D400 First line should end with '.', not 'd'
214: D209 Put multi-line docstring closing quotes on separate line
214: D400 First line should end with '.', not 'n'
214: D205 Blank line missing between one-line summary and description
231:49: E128 continuation line under-indented for visual indent
232:49: E128 continuation line under-indented for visual indent
233:49: E128 continuation line under-indented for visual indent
253:1: E302 expected 2 blank lines, found 1
253: D203 Expected 1 blank line *before* class docstring, found 0
253: D204 Expected 1 blank line *after* class docstring, found 0
253: D400 First line should end with '.', not 's'
263: D209 Put multi-line docstring closing quotes on separate line
271: D401 First line should be imperative: 'Applie', not 'Applies'
271: D400 First line should end with '.', not 'd'
284:1: E302 expected 2 blank lines, found 1
284: D203 Expected 1 blank line *before* class docstring, found 0
284: D400 First line should end with '.', not 'd'
287: D400 First line should end with '.', not 'd'
290:41: E711 comparison to None should be 'if cond is None:'
297:1: E302 expected 2 blank lines, found 1
297: D203 Expected 1 blank line *before* class docstring, found 0
297: D400 First line should end with '.', not 'd'
300: D102 Docstring missing
307: D401 First line should be imperative: 'Check', not 'Checks'
307: D400 First line should end with '.', not 'e'
307: D205 Blank line missing between one-line summary and description
317:59: E712 comparison to True should be 'if cond is True:' or 'if cond:'
329:36: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
335: D400 First line should end with '.', not 'd'
343:1: E302 expected 2 blank lines, found 1
343: D203 Expected 1 blank line *before* class docstring, found 0
343: D400 First line should end with '.', not 'd'
346: D202 No blank lines allowed *after* method docstring, found 1
346: D400 First line should end with '.', not 'd'
350:41: E711 comparison to None should be 'if cond is None:'
360: D401 First line should be imperative: 'Create', not 'Creates'
360: D400 First line should end with '.', not 't'
369:1: E302 expected 2 blank lines, found 1
369: D401 First line should be imperative: 'Return', not 'Returns'
369: D209 Put multi-line docstring closing quotes on separate line
369: D400 First line should end with '.', not 'e'
369: D205 Blank line missing between one-line summary and description
374:1: E302 expected 2 blank lines, found 1
374: D401 First line should be imperative: 'Return', not 'Returns'
378:1: E302 expected 2 blank lines, found 1
378: D401 First line should be imperative: 'Return', not 'Returns'
378: D202 No blank lines allowed *after* function docstring, found 1
378: D400 First line should end with '.', not 's'
389:33: E128 continuation line under-indented for visual indent
390:33: E128 continuation line under-indented for visual indent
390:48: E251 unexpected spaces around keyword / parameter equals
390:50: E251 unexpected spaces around keyword / parameter equals
391:33: E128 continuation line under-indented for visual indent
396:1: E302 expected 2 blank lines, found 1
396: D401 First line should be imperative: 'Return', not 'Returns'
422:18: F821 undefined name 'search_engine'
454:30: E128 continuation line under-indented for visual indent
455:30: E128 continuation line under-indented for visual indent
456:30: E128 continuation line under-indented for visual indent
457:30: E128 continuation line under-indented for visual indent
458:30: E128 continuation line under-indented for visual indent
480:49: E128 continuation line under-indented for visual indent
483:49: E128 continuation line under-indented for visual indent
485:49: E128 continuation line under-indented for visual indent
486:49: E128 continuation line under-indented for visual indent
487:49: E128 continuation line under-indented for visual indent
488:49: E128 continuation line under-indented for visual indent
489:49: E128 continuation line under-indented for visual indent
490:49: E128 continuation line under-indented for visual indent
494:1: E302 expected 2 blank lines, found 1
494: D401 First line should be imperative: 'Submit', not 'Submits'
494: D202 No blank lines allowed *after* function docstring, found 1
509:1: E302 expected 2 blank lines, found 1
509: D400 First line should end with '.', not 'd'
509: D205 Blank line missing between one-line summary and description
548:1: E302 expected 2 blank lines, found 1
548: D401 First line should be imperative: 'Return', not 'Returns'
548: D400 First line should end with '.', not 't'
566:37: E231 missing whitespace after ':'
566:55: E231 missing whitespace after ':'
566:72: E231 missing whitespace after ':'
567:38: E231 missing whitespace after ':'
567:55: E231 missing whitespace after ':'
567:73: E231 missing whitespace after ':'
568:36: E231 missing whitespace after ':'
573:18: F821 undefined name 'search_engine'
594:41: E128 continuation line under-indented for visual indent
595:41: E128 continuation line under-indented for visual indent
596:41: E128 continuation line under-indented for visual indent
601:1: E302 expected 2 blank lines, found 1
601: D401 First line should be imperative: 'Create', not 'Creates'
616:32: E231 missing whitespace after ':'
616:50: E231 missing whitespace after ':'
616:67: E231 missing whitespace after ':'
617:33: E231 missing whitespace after ':'
617:50: E231 missing whitespace after ':'
617:68: E231 missing whitespace after ':'
618:31: E231 missing whitespace after ':'
627:1: E302 expected 2 blank lines, found 1
627: D401 First line should be imperative: 'Thi', not 'This'
627: D400 First line should end with '.', not 'r'
627: D205 Blank line missing between one-line summary and description
640:18: F821 undefined name 'search_engine'
655:1: E302 expected 2 blank lines, found 1
655: D401 First line should be imperative: 'Applie', not 'Applies'
655: D209 Put multi-line docstring closing quotes on separate line
655: D202 No blank lines allowed *after* function docstring, found 1
655: D400 First line should end with '.', not 's'
655: D205 Blank line missing between one-line summary and description
663:14: F821 undefined name 'search_engine'
669:1: E302 expected 2 blank lines, found 1
669: D401 First line should be imperative: 'Upload', not 'Uploads'
669: D400 First line should end with '.', not 'd'
706:1: E302 expected 2 blank lines, found 1
706: D401 First line should be imperative: 'Return', not 'Returns'
706: D290 White spaces around docstring should be trimmed.
706: D202 No blank lines allowed *after* function docstring, found 1
706: D400 First line should end with '.', not 'd'
712:1: E302 expected 2 blank lines, found 1
712: D401 First line should be imperative: 'Save', not 'Saves'
712: D209 Put multi-line docstring closing quotes on separate line
712: D202 No blank lines allowed *after* function docstring, found 1
712: D400 First line should end with '.', not 't'
732:12: E714 test for object identity should be 'is not'