Commit 24b3d541 by Őry Máté

cloudgui: remove hard coded folder names

parent fe24d2fc
...@@ -128,18 +128,18 @@ class Browser: ...@@ -128,18 +128,18 @@ class Browser:
except: except:
False False
def mount_sshfs_folder(self): def mount_sshfs_folder(self):
user = getpass.getuser() self.folder = getpass.gethome() + "/sshfs"
neptun = self.params["neptun"] neptun = self.params["neptun"]
host = self.params["host"] host = self.params["host"]
try: try:
os.makedirs("/home/"+user+"/sshfs", 0644) os.makedirs(folder, 0644)
except: except:
pass pass
result = subprocess.call(['/usr/bin/sshfs', '-o', 'IdentityFile='+self.private_key_file, neptun+"@"+host+":home", "/home/"+user+"/sshfs"]) result = subprocess.call(['/usr/bin/sshfs', '-o', 'IdentityFile='+self.private_key_file, neptun+"@"+host+":home", folder])
#print result #print result
def umount_sshfs_folder(self): def umount_sshfs_folder(self):
try: try:
result = subprocess.call(['/bin/fusermount', '-u', "/home/tarokkk/sshfs"]) result = subprocess.call(['/bin/fusermount', '-u', self.folder])
except: except:
pass pass
def post_key(self,key = None): def post_key(self,key = None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment