diff --git a/rbtools/utils/process.py b/rbtools/utils/process.py
index d727f2b28d60e30d47f6ffac385c7caf2651887c..f68738d6c26c4ac1d6269478f6671782a70ace86 100644
--- a/rbtools/utils/process.py
+++ b/rbtools/utils/process.py
@@ -114,7 +114,7 @@ def execute(command,
             if results_unicode and isinstance(data, bytes):
                 data = data.decode('utf-8')
             elif not results_unicode and isinstance(data, six.text_type):
-                data = line.encode('utf-8')
+                data = data.encode('utf-8')
 
     if return_error_code:
         return rc, data
