Menu

#688 PyTango 8.1.4 new style server commands don't work

closed-fixed
None
PyTango
1
2014-10-01
2014-10-01
No

In PyTango 8.1.4, server commands without arguments in the new style API don't work!

class MyDevice(Device):
    __metaclass__ = DeviceMeta

    @command
    def go(self):
        pass
>>> device.go()
PyDs_PythonError: TypeError: cmd() takes exactly 2 arguments (1 given)

Discussion

  • Tiago Coutinho

    Tiago Coutinho - 2014-10-01
    • status: open --> closed-fixed
     
  • Tiago Coutinho

    Tiago Coutinho - 2014-10-01

    Fixed in PyTango SVN trunk since revision #26608
    It should become visible in next PyTango 8.1.5

     
  • Tiago Coutinho

    Tiago Coutinho - 2014-10-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,5 +8,5 @@
             pass
    
    
    ->>> device.go()
    +device.go()
     PyDs_PythonError: TypeError: cmd() takes exactly 2 arguments (1 given)
    
     
  • Tiago Coutinho

    Tiago Coutinho - 2014-10-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,12 +1,15 @@
     In PyTango 8.1.4, server commands without arguments in the new style API don't work!
    
    +~~~~~
     class MyDevice(Device):
         __metaclass__ = DeviceMeta
    
         @command
         def go(self):
             pass
    +~~~~~
    
    -
    -device.go()
    +~~~~~
    +>>> device.go()
     PyDs_PythonError: TypeError: cmd() takes exactly 2 arguments (1 given)
    +~~~~~
    
     

Log in to post a comment.

MongoDB Logo MongoDB