clean up a bit

This commit is contained in:
2025-02-26 22:25:21 +01:00
parent e23f8cb81e
commit 4062fd0bf0
6 changed files with 58 additions and 52 deletions

View File

@ -33,9 +33,7 @@ def main():
required=True,
help="Path to the ps7 initialization TCL file to prepare the processing system.",
)
parser.add_argument(
"-a", "--app", required=True, dest="app", help="Path to the app to program"
)
parser.add_argument("-a", "--app", dest="app", help="Path to the app to program")
parser.add_argument(
"-i",
"--ip",
@ -70,12 +68,13 @@ def main():
print("Error: 'xsct' could not be found after sourcing settings64.sh.")
sys.exit(1)
if not os.path.isfile(args.app):
if args.app and not os.path.isfile(args.app):
print(f"The app '{args.app}' does not exist")
sys.exit(1)
# Export environment variables
os.environ["APP"] = args.app
if args.app:
os.environ["APP"] = args.app
os.environ["IP_ADDRESS_HW_SERVER"] = args.ip
if args.bit:
os.environ["BITSTREAM"] = args.bit