[go: nahoru, domu]

Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bobs authored and bobs committed Apr 12, 2017
1 parent 505b26d commit 9b7ec57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tnscmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ def getVersion(self):
self.version = ""
self.getInformation(cmd='version')
vsnnum = re.findall(r'(?<=VSNNUM=).+?(?=\))', self.recvdata, flags=re.IGNORECASE)
hexversion = str(hex(int(vsnnum[0])))[2:]
if vsnnum == []:
return "Unknown"
else:
hexversion = str(hex(int(vsnnum[0])))[2:]
if len(hexversion)%2 !=0 : hexversion='0'+hexversion
versionList = re.findall('..?',hexversion)
for v in versionList : self.version += str(int(v,16)) + '.'
Expand Down

0 comments on commit 9b7ec57

Please sign in to comment.