Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 6
0
def getAllDevicePaths():
    try:
        return _getAllDevicePathsPyCdio()
    except ImportError:
        log.info('drive', 'Cannot import pycdio')
        return _getAllDevicePathsStatic()
Exemplo n.º 7
0
def getAllDevicePaths():
    try:
        return _getAllDevicePathsPyCdio()
    except ImportError:
        log.info('drive', 'Cannot import pycdio')
        return _getAllDevicePathsStatic()