Revert "fix(IPsecUtil): Delete keywords no longer used"
[csit.git] / resources / tools / scripts / topo_reservation.py
index 213fa63..f2d18bc 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
 # 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:
@@ -103,7 +103,8 @@ def main():
         # If connection is refused, ret==None.
         if ret != 0:
             print(f"Cancellation unsuccessful:\n{err!r}")
-        return 1
+            return 1
+        return 0
     # Before critical section, output can be outdated already.
     print(u"Diagnostic commands:")
     # -d and * are to suppress "total <size>", see https://askubuntu.com/a/61190
@@ -113,7 +114,7 @@ def main():
     ret, _, _ = exec_cmd(node, f"mkdir '{RESERVATION_DIR}'")
     # Critical section is over.
     if ret is None:
-        print(f"Failed to connect to testbed.")
+        print(u"Failed to connect to testbed.")
         return 1
     if ret != 0:
         _, stdo, _ = exec_cmd(node, f"ls '{RESERVATION_DIR}'/*")