Hi

I can't check out too much in depth since I'm on my phone. But you
definitely should not be using the return statement in your try except
since that will immediately return from your function and not execute any
more code. Also, is a try except necessary here? Does an optionvar call
raise an exception? I actually can't confirm atm.

A few nitpicky things...  remove the spacing in your params of function
calls:

foo( var = "hello" )

should really be

foo(var= "hello")

Also, I find it easier to read code when it tries to return early, instead
of having nested indented if statements. So if you have a check that needs
to pass before continuing then do something like

if x != 1:
    return

Instead of

if x == 1:
    if y == 2:
        if z == 3:
            print True

On Wed, 24 Dec 2014 3:54 PM yann19 <[email protected]> wrote:

> Hi all,
>
> i have sort of found the solution and it is working -
> http://pastebin.com/raw.php?i=PA61f9kb
>
> However, if someone could kindly give me some more pointers for
> refinement, I am at all ears :)
>
> Even so, I have a question in my code. In the try/except statement as
> suggested by Joe, I implemented it but as soon as I input in *return
> recentFiles*, both the dialogs will not run. Why is it so?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/fa42c21b-7f51-4483-b70a-bda207796a76%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/fa42c21b-7f51-4483-b70a-bda207796a76%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2W%3D054cKpbp5%3DzQgdMORkssK-bE2ESy-3W4zNU6CqdSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to