mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Make modules freestanding
Remove __init__.py from tipbot/modules, allowing loading them without having to declare them first
This commit is contained in:
parent
449ef1e594
commit
34d73d6460
2 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue