Changeset 1287 for TI05-delivery


Ignore:
Timestamp:
10/07/06 14:36:27 (13 years ago)
Author:
spascoe
Message:

Allow scanning of modules by epydoc without building the extensions.

Location:
TI05-delivery/trunk/lib/python/delivery
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/lib/python/delivery/client.py

    r1268 r1287  
    99 
    1010import sys 
    11 if sys.modules.has_key('delivery.bbftpd'): 
     11if sys.modules.has_key('delivery.bbftpd') and not sys.modules.has_key('epydoc'): 
    1212    raise ImportError, "delivery.bbftpd extension already loaded.  You cannot use both client and server extensions together" 
    1313 
  • TI05-delivery/trunk/lib/python/delivery/server.py

    r1269 r1287  
    1111 
    1212#!NOTE: Importing bbftpd and bbftpc together is dangerous and will cause stange errors. 
     13#       However if the module is being scanned by epydoc allow the import (This is a hack!) 
    1314import sys 
    14 if sys.modules.has_key('delivery.bbftpc'): 
     15if sys.modules.has_key('delivery.bbftpc') and not sys.modules.has_key('epydoc'): 
    1516    raise ImportError, "delivery.bbftpc extension already loaded.  You cannot use both client and server extensions together" 
    16  
    1717 
    1818import bbftpd 
Note: See TracChangeset for help on using the changeset viewer.