from logging import Formatter
from ftplib import FTP
from multiprocessing import cpu_count
+import kernel_persistence
__version__ = '0.0.2'
logger.info(
'module-assistant unpacked successfully.'
)
+ kernel_revision_obj = kernel_persistence.get_last_kernel_revision_obj(GIT_BRANCH_NAME)
+ kernel_persistence.update_kernel_f_obj(kernel_revision_obj, ' '.join(extra_modules))
return True
return True
finally:
session.close()
+
+def update_kernel_modules_obj(kernel_version_obj, pb_modules):
+ session = Session()
+ kernel_version_obj.pb_modules = pb_modules
+ session.add(kernel_version_obj)
+ try:
+ session.commit()
+ except Exception, error:
+ logger.error('Some error happend while commiting pb_modules')
+ logger.exception(error)
+ return False
+ else:
+ return True
+ finally:
+ session.close()