From e7f50f2c77f51c6fea6b2fc419389eae75fd0ce0 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 23 Nov 2018 16:34:08 +0100 Subject: Use list.extend instead of operator += The difference between list.extend and list.operator+= is that the later creates a new object while the former mutates the original object in place. Signed-off-by: Olivier Gayot --- monitor-menu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'monitor-menu.py') diff --git a/monitor-menu.py b/monitor-menu.py index 4aeec25..ecd70a5 100755 --- a/monitor-menu.py +++ b/monitor-menu.py @@ -32,12 +32,12 @@ class MonitorMenu(): cmd = ['xrandr'] try: - cmd += profile['xrandr-opts'] + cmd.extend(profile['xrandr-opts']) except KeyError: pass for monitor in profile['monitors']: - cmd += monitor['xrandr-opts'] + cmd.extend(monitor['xrandr-opts']) subprocess.run(cmd) -- cgit v1.2.3