diff --git a/docs/src/specification/client.rst b/docs/src/specification/client.rst index 3c96fe2..268efb1 100644 --- a/docs/src/specification/client.rst +++ b/docs/src/specification/client.rst @@ -14,7 +14,7 @@ Insertion --------- Inserts a local file given by the path within a hydra repo associated with the following Name. Insertion -requires the number nodes to be ``2xNum_Copies`` and it is advised to have the number of copies at least be 2 +requires the number nodes to be ``2xNum_Copies`` and it is required to have the number of copies at least be 2 so that if one fails, nodes can download the file from the other node that has the file. Assuming this is ran being in the root directory, the following is a template on ways to run diff --git a/ndn_hydra/client/main.py b/ndn_hydra/client/main.py index a0fbb1c..f609ef8 100644 --- a/ndn_hydra/client/main.py +++ b/ndn_hydra/client/main.py @@ -108,8 +108,11 @@ def interpret_help() -> None: # Configure Arguments if vars.function == "insert": if not os.path.isfile(vars.path): - print('Error: path specified is not an actual file. Unable to insert.') - sys.exit() + print('Error: path specified is not an actual file. Unable to insert.') + sys.exit() + if vars.copies < 2: + print('Error: insufficient number of copies, must be 2 or above.') + sys.exit() return vars class HydraClient():