← Back to team overview

ffc team mailing list archive

Re: A bug when jit() is called without any options

 

Maybe rather

if options is None:
    options = DEFAULT_FFC_OPTIONS.copy() # whatever the name is
else:
    options = options.copy()

-- 
Martin


2008/9/12 Johan Hake <hake@xxxxxxxxx>:
> Hello!
>
> When jit is called without any options I get the following:
>
>
>  File "/home/hake/local/lib/python2.5/site-packages/ffc/jit/jit.py", line 43,
> in jit
>    options = check_options(form, options)
>  File "/home/hake/local/lib/python2.5/site-packages/ffc/jit/jit.py", line 80,
> in check_options
>    options = options.copy()
> AttributeError: 'NoneType' object has no attribute 'copy'
>
> jit tries to copy a None.
>
>    if options is None:
>        options = {}
>    else:
>        options = options.copy()
>
> Would du the trick.
>
> Johan
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev
>


Follow ups

References