Пример #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()