Skip to content

Commit

Permalink
Merge pull request #214 from pturanyi/patch-2
Browse files Browse the repository at this point in the history
Update __main__.py
  • Loading branch information
wallyqs authored Nov 22, 2021
2 parents bf3a047 + 501e564 commit b437e48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/nats-pub/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ async def run(loop):
parser.add_argument('-d', '--data', default="hello world")
parser.add_argument('-s', '--servers', default="")
parser.add_argument('--creds', default="")
parser.add_argument('--token', default="")
args, unknown = parser.parse_known_args()

data = args.data
Expand All @@ -63,6 +64,9 @@ async def reconnected_cb():
if len(args.creds) > 0:
options["user_credentials"] = args.creds

if args.token.strip() != "":
options["token"] = args.token.strip()

try:
if len(args.servers) > 0:
options['servers'] = args.servers
Expand Down

0 comments on commit b437e48

Please sign in to comment.