diff options
author | Per Øyvind Karlsen <proyvind@moondrake.org> | 2016-05-31 06:39:12 +0200 |
---|---|---|
committer | Per Øyvind Karlsen <proyvind@moondrake.org> | 2016-05-31 06:39:12 +0200 |
commit | 0b0958bd6a0778cbb02f4c178967ccd51e0bb5e0 (patch) | |
tree | c2f7e9f33f5e3d31f17abd41c0fc6497c423714c /MgaRepo | |
parent | 4f5c8ad7fb2c7f10ad3a2a1b629a1bbe2715b7e3 (diff) | |
download | mgarepo-0b0958bd6a0778cbb02f4c178967ccd51e0bb5e0.tar mgarepo-0b0958bd6a0778cbb02f4c178967ccd51e0bb5e0.tar.gz mgarepo-0b0958bd6a0778cbb02f4c178967ccd51e0bb5e0.tar.bz2 mgarepo-0b0958bd6a0778cbb02f4c178967ccd51e0bb5e0.tar.xz mgarepo-0b0958bd6a0778cbb02f4c178967ccd51e0bb5e0.zip |
make sure there's a buffer before trying to read what's left
Diffstat (limited to 'MgaRepo')
-rw-r--r-- | MgaRepo/util.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MgaRepo/util.py b/MgaRepo/util.py index 9008a59..1237d12 100644 --- a/MgaRepo/util.py +++ b/MgaRepo/util.py @@ -78,7 +78,8 @@ def execcmd(*cmd, **kwargs): if proc.stdout is not None: output += proc.stdout.read(8192).decode('utf8') # Make sure that we've emptied the buffer entirely - output += proc.stdout.read().decode('utf8') + if proc.stdout is not None: + output += proc.stdout.read().decode('utf8') if kwargs.get("strip", True): output = output.rstrip() |