mirror of
https://github.com/JoelBender/bacpypes
synced 2025-10-13 00:42:44 +08:00
minor changes to allow these to continue to work in py25
This commit is contained in:
parent
985c69dd7e
commit
37c665000a
|
@ -36,7 +36,6 @@ this_console = None
|
||||||
# ReadPropertyApplication
|
# ReadPropertyApplication
|
||||||
#
|
#
|
||||||
|
|
||||||
@bacpypes_debugging
|
|
||||||
class ReadPropertyApplication(BIPSimpleApplication):
|
class ReadPropertyApplication(BIPSimpleApplication):
|
||||||
|
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
|
@ -87,11 +86,12 @@ class ReadPropertyApplication(BIPSimpleApplication):
|
||||||
value.debug_contents(file=sys.stdout)
|
value.debug_contents(file=sys.stdout)
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
bacpypes_debugging(ReadPropertyApplication)
|
||||||
|
|
||||||
#
|
#
|
||||||
# ReadPropertyConsoleCmd
|
# ReadPropertyConsoleCmd
|
||||||
#
|
#
|
||||||
|
|
||||||
@bacpypes_debugging
|
|
||||||
class ReadPropertyConsoleCmd(ConsoleCmd):
|
class ReadPropertyConsoleCmd(ConsoleCmd):
|
||||||
|
|
||||||
def do_read(self, args):
|
def do_read(self, args):
|
||||||
|
@ -130,6 +130,8 @@ class ReadPropertyConsoleCmd(ConsoleCmd):
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
ReadPropertyConsoleCmd._exception("exception: %r", e)
|
ReadPropertyConsoleCmd._exception("exception: %r", e)
|
||||||
|
|
||||||
|
bacpypes_debugging(ReadPropertyConsoleCmd)
|
||||||
|
|
||||||
#
|
#
|
||||||
# __main__
|
# __main__
|
||||||
#
|
#
|
||||||
|
|
|
@ -29,7 +29,6 @@ this_application = None
|
||||||
# SampleApplication
|
# SampleApplication
|
||||||
#
|
#
|
||||||
|
|
||||||
@bacpypes_debugging
|
|
||||||
class SampleApplication(BIPSimpleApplication):
|
class SampleApplication(BIPSimpleApplication):
|
||||||
|
|
||||||
def __init__(self, device, address):
|
def __init__(self, device, address):
|
||||||
|
@ -52,6 +51,8 @@ class SampleApplication(BIPSimpleApplication):
|
||||||
if _debug: SampleApplication._debug("confirmation %r", apdu)
|
if _debug: SampleApplication._debug("confirmation %r", apdu)
|
||||||
BIPSimpleApplication.confirmation(self, apdu)
|
BIPSimpleApplication.confirmation(self, apdu)
|
||||||
|
|
||||||
|
bacpypes_debugging(SampleApplication)
|
||||||
|
|
||||||
#
|
#
|
||||||
# __main__
|
# __main__
|
||||||
#
|
#
|
||||||
|
|
|
@ -29,7 +29,6 @@ this_console = None
|
||||||
# SampleApplication
|
# SampleApplication
|
||||||
#
|
#
|
||||||
|
|
||||||
@bacpypes_debugging
|
|
||||||
class SampleApplication(BIPSimpleApplication):
|
class SampleApplication(BIPSimpleApplication):
|
||||||
|
|
||||||
def __init__(self, device, address):
|
def __init__(self, device, address):
|
||||||
|
@ -52,11 +51,12 @@ class SampleApplication(BIPSimpleApplication):
|
||||||
if _debug: SampleApplication._debug("confirmation %r", apdu)
|
if _debug: SampleApplication._debug("confirmation %r", apdu)
|
||||||
BIPSimpleApplication.confirmation(self, apdu)
|
BIPSimpleApplication.confirmation(self, apdu)
|
||||||
|
|
||||||
|
bacpypes_debugging(SampleApplication)
|
||||||
|
|
||||||
#
|
#
|
||||||
# SampleConsoleCmd
|
# SampleConsoleCmd
|
||||||
#
|
#
|
||||||
|
|
||||||
@bacpypes_debugging
|
|
||||||
class SampleConsoleCmd(ConsoleCmd):
|
class SampleConsoleCmd(ConsoleCmd):
|
||||||
|
|
||||||
def do_nothing(self, args):
|
def do_nothing(self, args):
|
||||||
|
@ -64,6 +64,8 @@ class SampleConsoleCmd(ConsoleCmd):
|
||||||
args = args.split()
|
args = args.split()
|
||||||
if _debug: SampleConsoleCmd._debug("do_nothing %r", args)
|
if _debug: SampleConsoleCmd._debug("do_nothing %r", args)
|
||||||
|
|
||||||
|
bacpypes_debugging(SampleConsoleCmd)
|
||||||
|
|
||||||
#
|
#
|
||||||
# __main__
|
# __main__
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue
Block a user