home_assistant-ble 1.4.0.pre.alpha.pre.48 → 1.4.0.pre.alpha.pre.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/home_assistant-ble +10 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e70a505266edab18f2a422f4427c9838e07913eb
4
- data.tar.gz: dde03a39be711f158c0cfae7fbd970f99e7ba7b0
3
+ metadata.gz: 622bc1ec8d5545186dae5bf39994e74d9cbd5777
4
+ data.tar.gz: ab020ca5c8832f2a67b06682af3a9e6a229c43ac
5
5
  SHA512:
6
- metadata.gz: 352414b6e5899233cd254f8de3d295d55eba44815c710bd38ac125e7157efc42e716ec814c04dd0adb9e523e6abccc74242e9c096d9db00c84ada8dbeba3ce84
7
- data.tar.gz: 61a644bd7d1301b550a39b71eb21285cacfb104632faeea154bc7a278d51c3aa2f79707942c29cfffea9ac76c1001f08845d71e207542c54c4454fc34245d37b
6
+ metadata.gz: ead1203b97722a6cb71cad66062590230b8446e0bdc5bef0ebe62904cc379c050d5bc5a9988880dc2a73eb3904a9783e14be1b1d2be63b9ed5d94ea464ce3fa9
7
+ data.tar.gz: d929dee60d3a1d7303c82c1a6fbbc941a91ff1ac6b0ee90828cb35ec66ac96a27e2d3e5168cc5f3ec361415b4dd7bf0bf8b8ea3c2140975027e241a0d641fa83
@@ -11,15 +11,17 @@ $stderr.sync = true
11
11
 
12
12
  def shut_down
13
13
  @detector.clean_all_devices
14
- $stdout.puts 'Quitting'
14
+ $stdout.puts 'Quitting...'
15
15
  end
16
16
 
17
17
  Signal.trap('INT') do
18
+ $stdout.puts 'Received SIGINT.'
18
19
  shut_down
19
20
  exit
20
21
  end
21
22
 
22
23
  Signal.trap('TERM') do
24
+ $stdout.puts 'Received SIGTERM.'
23
25
  shut_down
24
26
  exit
25
27
  end
@@ -34,4 +36,10 @@ end
34
36
 
35
37
  @detector = HomeAssistant::Ble::Detector.new(config)
36
38
 
37
- @detector.run
39
+ begin
40
+ @detector.run
41
+ rescue ScriptError
42
+ # If no BLE interface is available clean up and exit
43
+ $stdout.puts 'No Bluetooth interfaces available.'
44
+ shut_down
45
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: home_assistant-ble
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.pre.alpha.pre.48
4
+ version: 1.4.0.pre.alpha.pre.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grégoire Seux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-22 00:00:00.000000000 Z
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler