Make modules freestanding

Remove __init__.py from tipbot/modules, allowing loading them
without having to declare them first
master
moneromooo 10 years ago
parent 449ef1e594
commit 34d73d6460

@ -11,6 +11,7 @@
#
import sys
import os
import socket
import select
import random
@ -68,10 +69,11 @@ if not selected_coin:
log_error('Coin setup needs to be specified with -c. See --help')
exit(1)
sys.path.append(os.path.join('tipbot','modules'))
for modulename in modulenames:
log_info('Importing %s module' % modulename)
try:
__import__("tipbot.modules.%s" % modulename)
__import__(modulename)
except Exception,e:
log_error('Failed to load module "%s": %s' % (modulename, str(e)))
exit(1)

@ -1 +0,0 @@
__all__ = ['tipping', 'withdraw', 'payment']
Loading…
Cancel
Save