Skip to content

Commit

Permalink
Merge pull request Juniper#545 from vnitinv/master
Browse files Browse the repository at this point in the history
host can be passed without keyword in case of console too
  • Loading branch information
vnitinv authored Jul 7, 2016
2 parents 678f88f + 4572cd2 commit 6b15259
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/jnpr/junos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ def __new__(cls, *args, **kwargs):
# __new__() is an instance of the class in which the __new__()
# method is contained (here Device class). Hence calling __init__
# explicitly.
instance.__init__(*args, **kwargs)
kwargs['host']=args[0] if len(args) else kwargs.get('host')
instance.__init__(**kwargs)
return instance
else:
if sys.version < '3':
Expand Down

0 comments on commit 6b15259

Please sign in to comment.