summaryrefslogtreecommitdiffstats
path: root/layman/overlays/overlay.py
diff options
context:
space:
mode:
Diffstat (limited to 'layman/overlays/overlay.py')
-rw-r--r--layman/overlays/overlay.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py
index 14aaa94..56186d8 100644
--- a/layman/overlays/overlay.py
+++ b/layman/overlays/overlay.py
@@ -154,8 +154,9 @@ class Overlay:
OUT.info('Running command "' + command + '"...', 2)
if hasattr(sys.stdout,'encoding'):
- command = command.encode(sys.stdout.encoding or
- sys.getfilesystemencoding())
+ enc = sys.stdout.encoding or sys.getfilesystemencoding()
+ if enc:
+ command = command.encode(enc)
if not self.quiet:
return os.system(command)