mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added executable attribute to table for files
This commit is contained in:
parent
c729b8a6d6
commit
d54cd790b1
@ -30,6 +30,7 @@ def read_files(filesxml):
|
||||
fil_obj.set_archive(props.get('archive', default=None))
|
||||
fil_obj.set_hidden(props.get('hidden', default=None))
|
||||
fil_obj.set_suppress(props.get('suppress', default=None))
|
||||
fil_obj.set_executable(props.get('executable', default=None))
|
||||
files.append(fil_obj)
|
||||
|
||||
return files
|
||||
@ -54,3 +55,5 @@ class fileentry:
|
||||
self.hidden = hidden
|
||||
def set_suppress(self, suppress):
|
||||
self.suppress = suppress
|
||||
def set_executable(self, executable):
|
||||
self.executable = executable
|
||||
|
@ -216,17 +216,17 @@ class file_entry(object):
|
||||
'''
|
||||
Object mapping representing FILES.XML
|
||||
'''
|
||||
def __init__(self, sid, scrobj, policy_name):
|
||||
def __init__(self, sid, fileobj, policy_name):
|
||||
self.sid = sid
|
||||
self.policy_name = policy_name
|
||||
self.action = scrobj.action
|
||||
self.fromPath = scrobj.fromPath
|
||||
self.targetPath = scrobj.targetPath
|
||||
self.readOnly = scrobj.readOnly
|
||||
self.archive = scrobj.archive
|
||||
self.hidden = scrobj.hidden
|
||||
self.suppress = scrobj.suppress
|
||||
|
||||
self.action = fileobj.action
|
||||
self.fromPath = fileobj.fromPath
|
||||
self.targetPath = fileobj.targetPath
|
||||
self.readOnly = fileobj.readOnly
|
||||
self.archive = fileobj.archive
|
||||
self.hidden = fileobj.hidden
|
||||
self.suppress = fileobj.suppress
|
||||
self.executable = fileobj.executable
|
||||
|
||||
def update_fields(self):
|
||||
'''
|
||||
@ -241,6 +241,7 @@ class file_entry(object):
|
||||
fields['archive'] = self.archive
|
||||
fields['hidden'] = self.hidden
|
||||
fields['suppress'] = self.suppress
|
||||
fields['executable'] = self.executable
|
||||
|
||||
return fields
|
||||
|
||||
|
@ -178,6 +178,7 @@ class sqlite_registry(registry):
|
||||
, Column('archive', String)
|
||||
, Column('hidden', String)
|
||||
, Column('suppress', String)
|
||||
, Column('executable', String)
|
||||
, UniqueConstraint('sid', 'policy_name', 'targetPath', 'fromPath')
|
||||
)
|
||||
self.__ini = Table(
|
||||
|
Loading…
x
Reference in New Issue
Block a user