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