Skip to content

Commit

Permalink
Merge pull request #38 from ploxiln/paramiko_pkgname
Browse files Browse the repository at this point in the history
version info now distinguishes between Paramiko and paramiko-ng
  • Loading branch information
ploxiln authored Apr 17, 2020
2 parents 4b77189 + 3f4983d commit 1131d55
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fabric/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,15 @@ def main(fabfile_locations=None):

# Handle version number option
if options.show_version:
if hasattr(ssh, '__pkgname__'):
ssh_pkgname = ssh.__pkgname__
elif hasattr(ssh.kex_ecdh_nist, '_ecdh_public_bytes'):
ssh_pkgname = 'paramiko-ng'
else:
ssh_pkgname = 'Paramiko'

print("fab-classic %s" % state.env.version)
print("Paramiko %s" % ssh.__version__)
print("%s %s" % (ssh_pkgname, ssh.__version__))
print("Python %d.%d.%d" % sys.version_info[:3])
sys.exit(0)

Expand Down

0 comments on commit 1131d55

Please sign in to comment.