aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlice Ferrazzi <alicef@gentoo.org>2017-07-11 21:46:03 +0900
committerAlice Ferrazzi <alicef@gentoo.org>2017-07-11 21:46:03 +0900
commit843063423b8b6b9202e6c10c5a2d82268a0a000d (patch)
tree96e065a4270ed2ad11ca811a1a245545268f7e3a
parentset kernel directory under /tmp/elivepatch- + uuid + /usr/src/linux (diff)
downloadelivepatch-843063423b8b6b9202e6c10c5a2d82268a0a000d.tar.gz
elivepatch-843063423b8b6b9202e6c10c5a2d82268a0a000d.tar.bz2
elivepatch-843063423b8b6b9202e6c10c5a2d82268a0a000d.zip
add livepatch in uuid subdirectories for divide builded livepatch
-rw-r--r--elivepatch_client/client/restful.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/elivepatch_client/client/restful.py b/elivepatch_client/client/restful.py
index 5f7a291..e89d397 100644
--- a/elivepatch_client/client/restful.py
+++ b/elivepatch_client/client/restful.py
@@ -6,6 +6,8 @@
import time
import requests
+import os
+import shutil
class ManaGer(object):
@@ -79,4 +81,9 @@ class ManaGer(object):
else:
r.close()
time.sleep(5)
- return self.get_livepatch() # try to get the livepatch again
+ return self.get_livepatch() # try to get the livepatch again
+ elivepatch_dir = os.path.join('..', 'elivepatch-'+ self.user_id)
+ if not os.path.exists(elivepatch_dir):
+ os.makedirs(elivepatch_dir)
+ shutil.move("myfile.ko", os.path.join(elivepatch_dir, 'livepatch.ko'))
+