~ubuntu-branches/ubuntu/trusty/python-pyhsm/trusty

« back to all changes in this revision

Viewing changes to Tests/test_init.py

  • Committer: Package Import Robot
  • Author(s): Simon Josefsson, Dain Nilsson
  • Date: 2013-04-16 14:58:00 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130416145800-mv6l8sme2mu9gfx3
Tags: 1.0.4f-1
[ Dain Nilsson ]
* New upstream release.
  - Support URLs in device field, for more info see:
    http://pyserial.sourceforge.net/pyserial_api.html#serial.serial_for_url
  - Added yhsm-daemon.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
    # Check if we have a YubiHSM present, and start with locking it's keystore
55
55
    # XXX produce a better error message than 'error: None' when initializing fails
56
 
    hsm = pyhsm.YHSM(device = "/dev/ttyACM0")
 
56
    hsm = pyhsm.YHSM(device = os.getenv('YHSM_DEVICE', '/dev/ttyACM0'))
57
57
    try:
58
58
        hsm.unlock("BADPASSPHRASE99")
59
59
    except pyhsm.exception.YHSM_CommandFailed, e: