manul icon indicating copy to clipboard operation
manul copied to clipboard

[Linux] Some python bugs (with fix) in dbi driver

Open kotee4ko opened this issue 4 years ago • 0 comments

https://github.com/mxmssh/manul/blob/master/dbi_mode.py#L15

#1 15 - return "/usr/tmp/manul_uds_socket_%d" 15 + return "/usr/tmp/manul_uds_socket_%d" % random.randint(1, 999999999)

#2 on Debian 10 Linux l0c4lh05t 5.10.24 #8 SMP Sun Jun 13 01:31:09 EEST 2021 x86_64 GNU/Linux I don't have /usr/tmp dir.

63 os.unlink(self.ipc_obj_name) return false and 73 self.sock.bind(self.ipc_obj_name) return crash FileNotFoundError: [Errno 2] No such file or directory

workaround:

 61         # Make sure the socket does not already exist
 62         if not os.path.exists("/usr/tmp"):
 63             try:
 64                 os.mkdir("/usr/tmp")
 65             except:
 66                 print("Can't create dir with very strange path. Are u root?\n")
 67

kotee4ko avatar Aug 06 '21 23:08 kotee4ko