Skip to content

Commit

Permalink
Add some print statements when loading up libraries fails
Browse files Browse the repository at this point in the history
(this happens when libraries are loaded without hardware)
  • Loading branch information
CleoQc committed Jul 3, 2017
1 parent a42684b commit 03e5624
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Software/Python/easygopigo3.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
import gopigo3
except ImportError:
hardware_connected = False
except:
print("Cannot import gopigo3 library")
except Exception as e:
hardware_connected = False
print("Unknown issue while importing gopigo3")
print(e)


# from datetime import datetime
Expand Down
1 change: 1 addition & 0 deletions Software/Python/gopigo3.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import fcntl # for lockf mutex support
except:
hardware_connected = False
print ("Can't import spidev or fcntl")

import math # import math for math.pi constant
import time
Expand Down

0 comments on commit 03e5624

Please sign in to comment.