diff options
Diffstat (limited to 'elivepatch_client/client/restful.py')
-rw-r--r-- | elivepatch_client/client/restful.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/elivepatch_client/client/restful.py b/elivepatch_client/client/restful.py index 517af44..fa6c583 100644 --- a/elivepatch_client/client/restful.py +++ b/elivepatch_client/client/restful.py @@ -85,7 +85,11 @@ class ManaGer(object): print('livepatch not found') r.close() - elivepatch_uuid_dir = os.path.join('..', 'elivepatch-'+ self.uuid) - if not os.path.exists(elivepatch_uuid_dir): - os.makedirs(elivepatch_uuid_dir) - shutil.move("myfile.ko", os.path.join(elivepatch_uuid_dir, 'livepatch.ko')) + if os.path.exists('myfile.ko'): + elivepatch_uuid_dir = os.path.join('..', 'elivepatch-'+ self.uuid) + if not os.path.exists(elivepatch_uuid_dir): + os.makedirs(elivepatch_uuid_dir) + shutil.move("myfile.ko", os.path.join(elivepatch_uuid_dir, 'livepatch.ko')) + print('livepatch saved in ' + elivepatch_uuid_dir + '/ folder') + else: + print('livepatch not received') |