Lint: E302 expected 2 blank lines, found X
This commit is contained in:
@ -38,6 +38,7 @@ import pvcapid.provisioner as provisioner
|
||||
|
||||
config = None # Set in this namespace by flaskapi
|
||||
|
||||
|
||||
#
|
||||
# Common functions
|
||||
#
|
||||
@ -54,12 +55,14 @@ def open_database(config):
|
||||
cur = conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
|
||||
return conn, cur
|
||||
|
||||
|
||||
def close_database(conn, cur, failed=False):
|
||||
if not failed:
|
||||
conn.commit()
|
||||
cur.close()
|
||||
conn.close()
|
||||
|
||||
|
||||
#
|
||||
# OVA functions
|
||||
#
|
||||
@ -107,6 +110,7 @@ def list_ova(limit, is_fuzzy=True):
|
||||
else:
|
||||
return {'message': 'No OVAs found.'}, 404
|
||||
|
||||
|
||||
def delete_ova(name):
|
||||
ova_data, retcode = list_ova(name, is_fuzzy=False)
|
||||
if retcode != 200:
|
||||
@ -156,6 +160,7 @@ def delete_ova(name):
|
||||
close_database(conn, cur)
|
||||
return retmsg, retcode
|
||||
|
||||
|
||||
def upload_ova(pool, name, ova_size):
|
||||
ova_archive = None
|
||||
|
||||
@ -407,6 +412,7 @@ def upload_ova(pool, name, ova_size):
|
||||
retcode = 200
|
||||
return output, retcode
|
||||
|
||||
|
||||
#
|
||||
# OVF parser
|
||||
#
|
||||
|
Reference in New Issue
Block a user