summaryrefslogtreecommitdiffstats
path: root/scripts/ingenish
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-08 14:38:49 +0100
committerDavid Robillard <d@drobilla.net>2019-12-08 17:43:34 +0100
commit07821c99f75c574bff76cb6c7ceefa4f3d597140 (patch)
treee163bafe2f7e8012c0b98b0e4fa558c01f1905a2 /scripts/ingenish
parent6cc39a1ae4b407cbb1a5174d2adadfd90d28dee7 (diff)
downloadingen-07821c99f75c574bff76cb6c7ceefa4f3d597140.tar.gz
ingen-07821c99f75c574bff76cb6c7ceefa4f3d597140.tar.bz2
ingen-07821c99f75c574bff76cb6c7ceefa4f3d597140.zip
Cleanup: Format Python code to be mostly flake8 clean
Diffstat (limited to 'scripts/ingenish')
-rwxr-xr-xscripts/ingenish14
1 files changed, 5 insertions, 9 deletions
diff --git a/scripts/ingenish b/scripts/ingenish
index ee53c4a5..4fac6307 100755
--- a/scripts/ingenish
+++ b/scripts/ingenish
@@ -15,15 +15,8 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import ingen
-import os.path
-import re
import shlex
import sys
-import time
-try:
- import readline
-except:
- pass
# Python 2 compatibility
try:
@@ -31,6 +24,7 @@ try:
except NameError:
pass
+
def print_usage():
print('''Usage: ingenish [OPTION]... [COMMAND [ARGUMENT]...]
@@ -70,6 +64,7 @@ Example:
set /main/tone/output ingen:value 0.7
''')
+
def run(cmd):
if cmd[0] == 'help':
print_usage()
@@ -91,6 +86,7 @@ def run(cmd):
return ingen.delete(cmd[1])
return False
+
a = 1
server = 'unix:///tmp/ingen.sock'
if len(sys.argv) > 1:
@@ -110,12 +106,12 @@ if len(sys.argv) - a == 0:
run(shlex.split(input('> ')))
except (EOFError, KeyboardInterrupt, SystemExit):
break
- except:
+ except Exception:
print('error: %s' % sys.exc_info()[1])
else:
try:
update = run(sys.argv[a:])
if update:
print(update.serialize(format='n3'))
- except:
+ except Exception:
print('error: %s' % sys.exc_info()[1])