Module AptListener
source code
Listen for download requests from Apt.
logging.Logger
|
logger = logging.getLogger('DebTorrent.BT1.AptListener')
the logger to send all log messages to for this module
|
string
|
VERSION = 'DebTorrent/T-0.1.4'
the Server identifier sent to all sites
|
string
|
alas = 'your file may exist elsewhere in the universe\nbut ala...
the message to send when the data is not found
|
Imports:
subnetparse.IP_List,
subnetparse.ipv6_to_ipv4,
subnetparse.is_ipv4,
iprangeparse.IP_List,
bencode.bencode,
zurllib.quote,
zurllib.unquote,
Filter.Filter,
urlparse.urlparse,
os.path.join,
cStringIO.StringIO,
time.time,
time.gmtime,
time.strftime,
clock.clock,
sha.sha,
binascii.a2b_hex,
binascii.b2a_hex,
makemetafile.TorrentCreator,
HTTPCache.HTTPCache,
btformats.check_message,
os,
logging,
__init__.version,
__init__.product_name,
__init__.version_short
Create an ISO formatted string of the time.
- Parameters:
secs (float) - number of seconds since the epoch (optional, default is to use
the current time)
- Returns:
string
- the ISO formatted string representation of the time
|
Format a byte size for reading by the user.
- Parameters:
s (long) - the number of bytes
- Returns:
string
- the formatted size with appropriate units
|
|
Formats seconds into a human-readable time.
Formats a given number of seconds into a human-readable time
appropriate for display to the user.
- Parameters:
n (int) - the number of seconds
- Returns:
string
- a displayable representation of the number of seconds
|
alas
the message to send when the data is not found
- Type:
string
- Value:
'''your file may exist elsewhere in the universe
but alas, not here
'''
|
|