slight improvements in email command parsing
This commit is contained in:
@@ -139,6 +139,7 @@ class Command(BaseCommand):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
# remove attachment
|
# remove attachment
|
||||||
if donotdelete == 0:
|
if donotdelete == 0:
|
||||||
a.delete()
|
a.delete()
|
||||||
|
|||||||
@@ -109,11 +109,12 @@ def upload_options(body):
|
|||||||
yml = (yaml.load(body))
|
yml = (yaml.load(body))
|
||||||
try:
|
try:
|
||||||
for key, value in yml.iteritems():
|
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)
|
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)
|
uploadoptions = getplotoptions(uploadoptions,value)
|
||||||
if 'priva' in key:
|
if 'priva' in lowkey:
|
||||||
uploadoptions = getboolean(uploadoptions,value,'makeprivate')
|
uploadoptions = getboolean(uploadoptions,value,'makeprivate')
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
@@ -126,6 +127,9 @@ def upload_options(body):
|
|||||||
)+strpm
|
)+strpm
|
||||||
return {'error':pbm}
|
return {'error':pbm}
|
||||||
|
|
||||||
|
if uploadoptions == {}:
|
||||||
|
uploadoptions['message'] = 'No parsing issue. No valid commands detected'
|
||||||
|
|
||||||
return uploadoptions
|
return uploadoptions
|
||||||
|
|
||||||
def make_plot(r,w,f1,f2,plottype,title,imagename='',plotnr=0):
|
def make_plot(r,w,f1,f2,plottype,title,imagename='',plotnr=0):
|
||||||
|
|||||||
Reference in New Issue
Block a user