File: apt_proxytap.py

package info (click to toggle)
apt-proxy 1.9.35-0.3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 616 kB
  • ctags: 712
  • sloc: python: 3,749; sh: 384; makefile: 63
file content (16 lines) | stat: -rw-r--r-- 465 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import apt_proxy
from apt_proxy_conf import aptProxyFactoryConfig
from apt_proxy import AptProxyFactory
from twisted.internet.app import Application

from twisted.python import usage        # twisted command-line processing

class Options(usage.Options):
    optParameters = [];

def updateApplication(app, config):
    factory = AptProxyFactory()
    aptProxyFactoryConfig(factory)
    app = Application("AptProxy")
    app.listenTCP(factory.proxy_port, factory)