Commit a5a36785 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Code cleanup.

parent b7ac9f5d
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -74,18 +74,15 @@ DESCRIPTION
        elif storeResponse["responseType"] == "STORE_ACK":
            storageList = storeResponse["storageList"]
            if not storageList:
                sys.exit("No storage point found. Please add a storage point using the 'vos_storage' command.")
                sys.exit("No storage point found. Please add a storage point using the 'vos_storage' command.\n")
            print("Choose one of the following storage locations:")
            print()
            print(tabulate(storageList, headers = "keys", tablefmt = "pretty"))
            print()
            #print("----------------------------------------------------------------------")
            storageIdList = []
            for st in storageList:
                storageIdList.append(st["storage_id"])
                #print("[*] storage_id: {:<2d}   =>   hostname: {}".format(st['storage_id'], st['hostname']))
            storageId = None
            #print("----------------------------------------------------------------------\n")
            while not storageId in storageIdList:
                try:
                    storageId = input("Please, insert a storage id: ")
@@ -97,14 +94,14 @@ DESCRIPTION
                except KeyboardInterrupt:
                    sys.exit("\nCTRL+C detected. Exiting...")
            print()
            print("!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!")
            print("If you confirm, all your data on the transfer node will be")
            print("available in read-only mode for all the time the storage")
            print("process is running.")
            print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
            print("!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
            print("! If you confirm, all your data on the transfer node will be !")
            print("! available in read-only mode for all the time the storage   !")
            print("! process is running.                                        !")
            print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
            print()
            confirm = None
            while not confirm in [ "yes", "no"]:
            while not confirm in ( "yes", "no" ):
                try:
                    confirm = input("Are you sure to proceed? [yes/no]: ")
                except KeyboardInterrupt: