~stub/charm-helpers/py3-2

« back to all changes in this revision

Viewing changes to charmhelpers/core/host.py

  • Committer: Stuart Bishop
  • Date: 2014-11-25 13:46:24 UTC
  • Revision ID: stuart@stuartbishop.net-20141125134624-kuohr92wxvd6mvky
Revert Py3 syntax hidden by mocking

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
 
208
208
def mounts():
209
209
    """Get a list of all mounted volumes as [[mountpoint,device],[...]]"""
210
 
    with open('/proc/mounts', 'r', encoding='UTF-8') as f:
 
210
    with open('/proc/mounts') as f:
211
211
        # [['/mount/point','/dev/path'],[...]]
212
212
        system_mounts = [m[1::-1] for m in [l.strip().split()
213
213
                                            for l in f.readlines()]]