Menu

#484 Add confirmation step when overriding macros with edmac

Jul16
resolved
None
spock
feature-request
2016-08-23
2016-06-01
No

edmac <macro> <library> may override an already exisitng macros.
We have observed that users may mistekenly type the extra string when trying the edit a macro, what leads to overriding the macro with a new one e.g.

edmac dynaVtune 15

creates file:

/beamlines/bl04/controls/devel/macros/15.py

with:

@macro()
def dynaVtune(self):
    self.output("Running dynaVtune...")

An extra confirmation in spock e.g.
'Do you want to create macro "dynaVtune" in file "/beamlines/bl04/controls/devel/macros/15.py" that will override the already existing macro [y]'.
could help in avoiding these mistakes.

Discussion

  • Carlos Falcon

    Carlos Falcon - 2016-08-04
    • status: waiting --> active
    • assigned_to: Carlos Falcon
     
  • Carlos Falcon

    Carlos Falcon - 2016-08-04

    A patch has been sent to the list

     
  • Zbigniew Reszela

    • status: active --> resolved
     
  • Zbigniew Reszela

    Patch sent by Carlos was applied to the develop branch.