fix debug
This commit is contained in:
parent
4a6f66272a
commit
6adc5816f4
@ -119,7 +119,7 @@ def processFile(filename):
|
|||||||
if re.match(r'.*jpe?g$',filename):
|
if re.match(r'.*jpe?g$',filename):
|
||||||
for c in chat_ids:
|
for c in chat_ids:
|
||||||
try:
|
try:
|
||||||
logger.debug('sending %s as picture to %s' % (filename,c['username']))
|
logger.info('sending %s as picture to %s' % (filename,c['username']))
|
||||||
r=bot.sendPhoto(c['id'], open(filename, 'rb'))
|
r=bot.sendPhoto(c['id'], open(filename, 'rb'))
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
logger.debug('removed %s' % filename)
|
logger.debug('removed %s' % filename)
|
||||||
@ -129,7 +129,7 @@ def processFile(filename):
|
|||||||
for c in chat_ids:
|
for c in chat_ids:
|
||||||
try:
|
try:
|
||||||
with open(filename,'r') as f:
|
with open(filename,'r') as f:
|
||||||
logger.debug('sending %s as text to %s' % (filename,c['username']))
|
logger.info('sending %s as text to %s' % (filename,c['username']))
|
||||||
r=bot.sendMessage(c['id'], f.read())
|
r=bot.sendMessage(c['id'], f.read())
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
logger.debug('removed %s' % filename)
|
logger.debug('removed %s' % filename)
|
||||||
@ -161,7 +161,7 @@ class FilesChangedHandler(PatternMatchingEventHandler):
|
|||||||
|
|
||||||
def checkFiles():
|
def checkFiles():
|
||||||
spool_dir = configParser.get('general', 'spool_dir')
|
spool_dir = configParser.get('general', 'spool_dir')
|
||||||
logger.info('Checking %s for new files ...' % spool_dir)
|
logger.debug('Checking %s for new files ...' % spool_dir)
|
||||||
l=os.listdir(spool_dir)
|
l=os.listdir(spool_dir)
|
||||||
for f in l:
|
for f in l:
|
||||||
processFile("%s/%s" % (spool_dir,f) )
|
processFile("%s/%s" % (spool_dir,f) )
|
||||||
|
Loading…
Reference in New Issue
Block a user