utah on phablet breaks on _save_props

Bug #1191756 reported by Colin Ian King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UTAH
Fix Released
Medium
Andy Doan

Bug Description

I'm seeing _save_props break if I used the wrong --results-dir path:

king@lenovo:~/nexus-power/utah$ sudo PYTHONPATH=./touch ./touch/examples/run_utah_phablet.py --skip-install -l /home/phablet/examples/pm_probes.run --results-dir /home/king/nexus
= setting up network...
Network file is /etc/NetworkManager/system-connections/GLMLINUX
Provisioning network file to device
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
adbd is already running as root
6 KB/s (294 bytes in 0.041s)

Network setup complete

= installing utah...
adbd is already running as root
gpg: keyring `/tmp/tmpsr90l_/secring.gpg' created
gpg: keyring `/tmp/tmpsr90l_/pubring.gpg' created
gpg: requesting key 63840199 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpsr90l_/trustdb.gpg: trustdb created
gpg: key 63840199: public key "Launchpad PPA for Ubuntu Automation Test Harness Dev" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
Reading package lists...
Building dependency tree...
Reading state information...
utah-client is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 74 not upgraded.
Traceback (most recent call last):
  File "./touch/examples/run_utah_phablet.py", line 322, in <module>
    main()
  File "./touch/examples/run_utah_phablet.py", line 316, in main
    _save_props(args)
  File "./touch/examples/run_utah_phablet.py", line 138, in _save_props
    with open(props_file, 'w') as f:
IOError: [Errno 2] No such file or directory: '/home/king/nexus/adb.props'

.. _save_props does zero error checking:

def _save_props(args):
    props = _adb(args, ['shell', 'getprop'], True)
    props_file = os.path.join(args.results_dir, 'adb.props')
    with open(props_file, 'w') as f:
        f.write(props)

Perhaps some error checking or stat'ing the directory before it's open'd would be more user friendly.

Tags: phablet
Revision history for this message
Andy Doan (doanac) wrote :

fixed at home with: http://bazaar.launchpad.net/~doanac/utah/touch/revision/948

trying to merge that branch this week.

Changed in utah:
assignee: nobody → Andy Doan (doanac)
importance: Undecided → Medium
status: New → In Progress
Andy Doan (doanac)
tags: added: phablet
Andy Doan (doanac)
Changed in utah:
status: In Progress → Fix Released
status: Fix Released → Fix Committed
Andy Doan (doanac)
Changed in utah:
status: Fix Committed → Fix Released
milestone: none → 0.14
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.