コード例 #1
0
ファイル: drive.py プロジェクト: DoomHammer/morituri
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
ファイル: musicbrainzngs.py プロジェクト: mustbenice/morituri
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
ファイル: drive.py プロジェクト: JamesKoenig/morituri
def getAllDevicePaths():
    try:
        return _getAllDevicePathsPyCdio()
    except ImportError:
        log.info('drive', 'Cannot import pycdio')
        return _getAllDevicePathsStatic()