Private
Public Access
1
0

slight improvements in email command parsing

This commit is contained in:
Sander Roosendaal
2017-09-27 09:03:16 +02:00
parent 8bff1dae59
commit ebce342fce
2 changed files with 9 additions and 4 deletions

View File

@@ -139,6 +139,7 @@ class Command(BaseCommand):
except:
pass
# remove attachment
if donotdelete == 0:
a.delete()

View File

@@ -109,11 +109,12 @@ def upload_options(body):
yml = (yaml.load(body))
try:
for key, value in yml.iteritems():
if key == 'sync' or key == 'synchronization':
lowkey = key.lower()
if lowkey == 'sync' or lowkey == 'synchronization':
uploadoptions = getsyncoptions(uploadoptions,value)
if key == 'chart' or key == 'static' or key == 'plot':
if lowkey == 'chart' or lowkey == 'static' or lowkey == 'plot':
uploadoptions = getplotoptions(uploadoptions,value)
if 'priva' in key:
if 'priva' in lowkey:
uploadoptions = getboolean(uploadoptions,value,'makeprivate')
except AttributeError:
pass
@@ -125,7 +126,10 @@ def upload_options(body):
pm.column+1,
)+strpm
return {'error':pbm}
if uploadoptions == {}:
uploadoptions['message'] = 'No parsing issue. No valid commands detected'
return uploadoptions
def make_plot(r,w,f1,f2,plottype,title,imagename='',plotnr=0):