示例#1
0
def getAllDevicePaths():
    try:
        # see https://savannah.gnu.org/bugs/index.php?38477
        return [str(dev) for dev in _getAllDevicePathsPyCdio()]
    except ImportError:
        log.info('drive', 'Cannot import pycdio')
        return _getAllDevicePathsStatic()
示例#2
0
def getAllDevicePaths():
    try:
        # see https://savannah.gnu.org/bugs/index.php?38477
        return [str(dev) for dev in _getAllDevicePathsPyCdio()]
    except ImportError:
        log.info('drive', 'Cannot import pycdio')
        return _getAllDevicePathsStatic()
示例#3
0
def _record(record, which, name, what):
    # optionally record to disc as a JSON serialization
    if record:
        import json
        filename = 'morituri.%s.%s.json' % (which, name)
        handle = open(filename, 'w')
        handle.write(json.dumps(what))
        handle.close()
        log.info('mbngs', 'Wrote %s %s to %s', which, name, filename)
示例#4
0
def _record(record, which, name, what):
    # optionally record to disc as a JSON serialization
    if record:
        import json
        filename = 'morituri.%s.%s.json' % (which, name)
        handle = open(filename, 'w')
        handle.write(json.dumps(what))
        handle.close()
        log.info('musicbrainzngs', 'Wrote %s %s to %s', which, name, filename)
示例#5
0
def _record(record, which, name, what):
    # optionally record to disc as a JSON serialization
    if record:
        import json

        filename = "morituri.%s.%s.json" % (which, name)
        handle = open(filename, "w")
        handle.write(json.dumps(what))
        handle.close()
        log.info("mbngs", "Wrote %s %s to %s", which, name, filename)
示例#6
0
def getAllDevicePaths():
    try:
        return _getAllDevicePathsPyCdio()
    except ImportError:
        log.info('drive', 'Cannot import pycdio')
        return _getAllDevicePathsStatic()
示例#7
0
def getAllDevicePaths():
    try:
        return _getAllDevicePathsPyCdio()
    except ImportError:
        log.info('drive', 'Cannot import pycdio')
        return _getAllDevicePathsStatic()