[svn-commits] pabelanger: branch pabelanger/sipp r1101 - /asterisk/team/pabelanger/sipp/lib...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Dec 7 14:39:03 CST 2010
Author: pabelanger
Date: Tue Dec 7 14:39:00 2010
New Revision: 1101
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1101
Log:
Remove logic for SVN version; no difference
Modified:
asterisk/team/pabelanger/sipp/lib/python/sipp/version.py
Modified: asterisk/team/pabelanger/sipp/lib/python/sipp/version.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/sipp/lib/python/sipp/version.py?view=diff&rev=1101&r1=1100&r2=1101
==============================================================================
--- asterisk/team/pabelanger/sipp/lib/python/sipp/version.py (original)
+++ asterisk/team/pabelanger/sipp/lib/python/sipp/version.py Tue Dec 7 14:39:00 2010
@@ -20,7 +20,6 @@
"""A SIPp Version.
"""
-
def __init__(self, version=None):
"""Construct a SIPp Version parser.
@@ -54,18 +53,15 @@
return self.version_str
def __int__(self):
- if self.svn is True:
- return -1
- else:
- concept = self.concept.strip('v')
- res = int(concept) * 10000000 + int(self.major) * 100000
- if self.minor is not None:
- res += int(self.minor) * 1000
- if self.tls:
- res += 100
- if self.pcap:
- res += 100
- return res
+ concept = self.concept.strip('v')
+ res = int(concept) * 10000000 + int(self.major) * 100000
+ if self.minor is not None:
+ res += int(self.minor) * 1000
+ if self.tls:
+ res += 100
+ if self.pcap:
+ res += 100
+ return res
def __cmp__(self, other):
res = cmp(int(self), int(other))
@@ -87,7 +83,6 @@
return False
def __parse_version(self):
- self.svn = False
self.tls = False
self.pcap = False
parts = self.version_str.split(".")
@@ -118,7 +113,6 @@
class SIPpVersionTests(unittest.TestCase):
def test_version(self):
v = SIPpVersion("v3.2")
- self.assertFalse(v.svn)
self.assertEqual(str(v), "v3.2")
self.assertEqual(v.concept, "v3")
self.assertEqual(v.major, "2")
@@ -127,7 +121,6 @@
def test_version2(self):
v = SIPpVersion("v2.0.1")
- self.assertFalse(v.svn)
self.assertEqual(str(v), "v2.0.1")
self.assertEqual(v.concept, "v2")
self.assertEqual(v.major, "0")
@@ -137,7 +130,6 @@
def test_version3(self):
v = SIPpVersion("v3.1-TLS")
- self.assertFalse(v.svn)
self.assertEqual(str(v), "v3.1-TLS")
self.assertEqual(v.concept, "v3")
self.assertEqual(v.major, "1")
@@ -146,7 +138,6 @@
def test_version4(self):
v = SIPpVersion("v2.0.1-TLS-PCAP")
- self.assertFalse(v.svn)
self.assertEqual(str(v), "v2.0.1-TLS-PCAP")
self.assertEqual(v.concept, "v2")
self.assertEqual(v.major, "0")
@@ -156,7 +147,6 @@
def test_version5(self):
v = SIPpVersion("v3.2-PCAP")
- self.assertFalse(v.svn)
self.assertEqual(str(v), "v3.2-PCAP")
self.assertEqual(v.concept, "v3")
self.assertEqual(v.major, "2")
More information about the svn-commits
mailing list