mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 21:26:39 +08:00
__main__: fix PEP8
This commit is contained in:
@@ -180,6 +180,14 @@ def create_parser(description, interface_factory):
|
|||||||
return p
|
return p
|
||||||
|
|
||||||
|
|
||||||
|
class _Dummy(object):
|
||||||
|
def __enter__(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
def __exit__(self, *args):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def _main():
|
def _main():
|
||||||
fmt = ('Audio OFDM MODEM v{0:s}: '
|
fmt = ('Audio OFDM MODEM v{0:s}: '
|
||||||
'{1:.1f} kb/s ({2:d}-QAM x {3:d} carriers) '
|
'{1:.1f} kb/s ({2:d}-QAM x {3:d} carriers) '
|
||||||
@@ -219,12 +227,7 @@ def _main():
|
|||||||
from . import alsa
|
from . import alsa
|
||||||
interface = alsa.Interface(config)
|
interface = alsa.Interface(config)
|
||||||
elif args.audio_library == '-':
|
elif args.audio_library == '-':
|
||||||
class _DummyInterface(object):
|
interface = _Dummy()
|
||||||
def __enter__(self):
|
|
||||||
return self
|
|
||||||
def __exit__(self, *args):
|
|
||||||
pass
|
|
||||||
interface = _DummyInterface()
|
|
||||||
else:
|
else:
|
||||||
interface = audio.Interface(config)
|
interface = audio.Interface(config)
|
||||||
interface.load(args.audio_library)
|
interface.load(args.audio_library)
|
||||||
|
|||||||
Reference in New Issue
Block a user