~ubuntu-branches/debian/jessie/armory/jessie

« back to all changes in this revision

Viewing changes to BitTornado/BT1/Filter.py

  • Committer: Package Import Robot
  • Author(s): Joseph Bisch
  • Date: 2014-10-07 10:22:45 UTC
  • Revision ID: package-import@ubuntu.com-20141007102245-2s3x3rhjxg689hek
Tags: upstream-0.92.3
ImportĀ upstreamĀ versionĀ 0.92.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
class Filter:
 
2
    def __init__(self, callback):
 
3
        self.callback = callback
 
4
 
 
5
    def check(self, ip, paramslist, headers):
 
6
 
 
7
        def params(key, default = None, l = paramslist):
 
8
            if l.has_key(key):
 
9
                return l[key][0]
 
10
            return default
 
11
 
 
12
        return None