Skip to content

Commit

Permalink
Fixed code style warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
liamw9534 committed Sep 1, 2014
1 parent 9aac5be commit 51be291
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,23 @@ def agent_event_handler(*args):
print 'Agent event:', args
return True


def agent_event_request_pin_code(event, device):
print '\n========================================================='
print 'Agent event:', event
print 'Device:', device
print 'Enter PIN 1234 on device'
return dbus.String('1234')


def agent_event_request_pass_key(event, device):
print '\n========================================================='
print 'Agent event:', event
print 'Device:', device
print 'Using pass code 1234765'
return dbus.UInt32('1234765')


def device_created_ok(*args):
print '\n========================================================='
print 'New Device Paired:', args
Expand Down Expand Up @@ -303,7 +306,6 @@ def discovery_stop(args):
def agent_start(args):

global services, adapter
dev_id = None

if (len(args)):
path = args.pop(0)
Expand All @@ -313,8 +315,8 @@ def agent_start(args):

try:
agent = bt_manager.BTAgent(path=path,
cb_notify_on_request_pin_code=agent_event_request_pin_code,
cb_notify_on_request_pass_key=agent_event_request_pass_key,
cb_notify_on_request_pin_code=agent_event_request_pin_code, # noqa
cb_notify_on_request_pass_key=agent_event_request_pass_key, # noqa
cb_notify_on_release=agent_event_handler,
cb_notify_on_authorize=agent_event_handler,
cb_notify_on_request_confirmation=agent_event_handler, # noqa
Expand Down Expand Up @@ -673,7 +675,7 @@ def media_stop(args):
'Run BT device discovery session',
'<dev_path>'),
'device-listen': CmdEntry(device_listen,
'Listen for device proeprty change events',
'Listen for device proeprty change events', # noqa
'<dev_path>'),
'device-create': CmdEntry(device_create,
'Create device',
Expand Down

0 comments on commit 51be291

Please sign in to comment.