diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-11-23 16:34:08 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-11-23 16:34:08 +0100 |
commit | e7f50f2c77f51c6fea6b2fc419389eae75fd0ce0 (patch) | |
tree | 74d94da60a6e0699059f52f6260739d514ce297c | |
parent | 315a75e3ee57b479dade9ce14d70b3aa2d56e105 (diff) |
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 <olivier.gayot@sigexec.com>
-rwxr-xr-x | monitor-menu.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |