Commit 72b4684e authored by Juraj Sloboda's avatar Juraj Sloboda Committed by Matej Feder

Move args parser config outside of main function

parent 0bca814d
......@@ -27,15 +27,16 @@ async def recv_callback(ctx, src_eid):
print()
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--node", type=str)
parser.add_argument("--port", type=int, default=42420)
parser.add_argument("--http-port", type=int, default=8080)
parser.add_argument("--upcn-eid", type=str, default='dtn://ops-sat.dtn')
parser.add_argument("--upcn-host", type=str, default="127.0.0.1")
parser.add_argument("--upcn-port", type=int, default=4556)
parser = argparse.ArgumentParser()
parser.add_argument("--node", type=str)
parser.add_argument("--port", type=int, default=42420)
parser.add_argument("--http-port", type=int, default=8080)
parser.add_argument("--upcn-eid", type=str, default='dtn://ops-sat.dtn')
parser.add_argument("--upcn-host", type=str, default="127.0.0.1")
parser.add_argument("--upcn-port", type=int, default=4556)
if __name__ == '__main__':
args = parser.parse_args()
# Start Bundle protocol server
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment