mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 09:42:15 +03:00
permission set feature
This commit is contained in:
parent
a7979e6006
commit
ab2e096f7b
1 changed files with 6 additions and 1 deletions
|
@ -13,6 +13,7 @@ import hashlib
|
||||||
import datetime
|
import datetime
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
class Util:
|
class Util:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
@ -83,7 +84,7 @@ class Util:
|
||||||
def read_file(full_path, mode='r'):
|
def read_file(full_path, mode='r'):
|
||||||
content = None
|
content = None
|
||||||
try:
|
try:
|
||||||
with open(full_path,mode) as f:
|
with open(full_path, mode) as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
@ -243,3 +244,7 @@ class Util:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def generate_uuid():
|
def generate_uuid():
|
||||||
return str(uuid.uuid4())
|
return str(uuid.uuid4())
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def set_permission(path, permission_code):
|
||||||
|
Util.execute('chmod {} {}'.format(permission_code, path))
|
||||||
|
|
Loading…
Reference in a new issue