~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to python/netsnmp/client.py

  • Committer: Bazaar Package Importer
  • Author(s): Jochen Friedrich
  • Date: 2009-11-12 16:17:40 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 32.
  • Revision ID: james.westby@ubuntu.com-20091112161740-t2xvix834vmtxa9f
Tags: upstream-5.4.2.1~dfsg
ImportĀ upstreamĀ versionĀ 5.4.2.1~dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        self.type = STR(type)
52
52
        # parse iid out of tag if needed
53
53
        if iid == None and tag != None:
54
 
            regex = re.compile(r'^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.?(.*)$')
 
54
            regex = re.compile(r'^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.(\d*?)$')
55
55
            match = regex.match(tag)
56
56
            if match:
57
57
                (self.tag, self.iid) = match.group(1,2)