mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 15:32:19 +03:00
json attribute checker added
This commit is contained in:
parent
719d2275de
commit
411460058a
1 changed files with 7 additions and 0 deletions
|
@ -248,3 +248,10 @@ class Util:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def set_permission(path, permission_code):
|
def set_permission(path, permission_code):
|
||||||
Util.execute('chmod {} {}'.format(permission_code, path))
|
Util.execute('chmod {} {}'.format(permission_code, path))
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def has_attr_json(arg, attr_name):
|
||||||
|
for j in json.loads(json.dumps(arg)):
|
||||||
|
if attr_name in j:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
Loading…
Reference in a new issue