mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-4995: Updated pcodetest framework to python3 and additional config
This commit is contained in:
parent
93c19e3cc6
commit
00687c8db8
9 changed files with 473 additions and 385 deletions
|
@ -1,17 +1,17 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
import os
|
||||
import shutil
|
||||
|
@ -20,6 +20,7 @@ import sys
|
|||
import pwd
|
||||
import grp
|
||||
import re
|
||||
from types import SimpleNamespace
|
||||
|
||||
class BuildUtil:
|
||||
|
||||
|
@ -286,7 +287,10 @@ class Config:
|
|||
|
||||
def format(self, val):
|
||||
if isinstance(val, str) and '%' in val:
|
||||
return val % self.__dict__
|
||||
try:
|
||||
return val % self.__dict__
|
||||
except KeyError:
|
||||
return val
|
||||
elif isinstance(val, dict):
|
||||
return {k: self.format(v) for k, v in val.items()}
|
||||
else: return val
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue