~ubuntu-branches/ubuntu/saucy/bluez/saucy

« back to all changes in this revision

Viewing changes to test/test-sap-server

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-07-04 13:28:49 UTC
  • mfrom: (1.1.38)
  • Revision ID: package-import@ubuntu.com-20120704132849-tmwu1x7p2vxcclt1
Tags: 4.101-0ubuntu1
* New upstream release
* debian/libbluetooth3.symbols:
  - Updated
* debian/patches/10-unregister_interface_on_exit.patch:
* debian/patches/11-explicitly_close.patch:
* debian/patches/python3.patch:
  - Applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python3
 
1
#!/usr/bin/python
 
2
 
 
3
from __future__ import absolute_import, print_function, unicode_literals
2
4
 
3
5
from sap import *
4
6
import time
19
21
        print("NOT OK")
20
22
        return 1
21
23
 
22
 
    except BluetoothError , e:
 
24
    except BluetoothError as e:
23
25
        print("Error " + str(e))
24
26
 
25
27
 
39
41
        print("NOT OK")
40
42
        return 1
41
43
 
42
 
    except BluetoothError , e:
 
44
    except BluetoothError as e:
43
45
        print("Error " + str(e))
44
46
 
45
47
 
75
77
        print("NOT OK")
76
78
        return 1
77
79
 
78
 
    except BluetoothError , e:
 
80
    except BluetoothError as e:
79
81
        print("Error " + str(e))
80
82
 
81
83
def connect_rfcomm_only_and_wait_for_close_by_server(sap):
116
118
        print("NOT OK")
117
119
        return 1
118
120
 
119
 
    except BluetoothError , e:
 
121
    except BluetoothError as e:
120
122
        print("Error " + str(e))
121
123
 
122
124
 
127
129
 
128
130
    try:
129
131
        s = SAPClient(host, port)
130
 
    except BluetoothError , e:
 
132
    except BluetoothError as e:
131
133
        print("Error " + str(e))
132
134
 
133
135
    connect_disconnect_by_client(s)